Skip to content

Conversation

@voluntadpear
Copy link
Contributor

Implements #1482.

Hi! I went ahead and implemented support on UI to specify a custom initial git commit message and skip git initialization.

I'm not sure if using a single switch for both actions and skip git initialization if the switch is on but no message is specified is the best approach, I can switch to something else like having different switches if it seems a better option.

Copy link
Member

@Akryum Akryum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! I have posted a few comments.

return {
folder: '',
force: false,
git: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be true by default to be consistent with the cli behavior.

"label": "Additional options",
"description": "Overwrite target folder if it exists"
"description": "Overwrite target folder if it exists",
"git": "Use custom first initial commit message or skip git initialization",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put "Initialize git repository (recommended)".


const cliOptions = {git: true}
// Git
if (input.skipGit) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the variable is wrong, it should be something like enableGit.

// Git
if (input.skipGit) {
if (!input.gitCommit) {
cliOptions.git = 'false'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be false.

remote: Boolean
clone: Boolean
save: String
skipGit: Boolean!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enableGit

input: {
folder: this.formData.folder,
force: this.formData.force,
skipGit: this.formData.git,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enableGit

@voluntadpear
Copy link
Contributor Author

Thanks for the review! I added the requested changes.

@Akryum Akryum force-pushed the feat/commit-message branch from a8dc019 to 7e77342 Compare June 11, 2018 13:04
@Akryum Akryum merged commit 29c1ce5 into vuejs:dev Jun 11, 2018
@voluntadpear voluntadpear deleted the feat/commit-message branch June 11, 2018 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants