Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --message option for custom commit msgs when publishing #460

Merged
merged 1 commit into from
Jan 24, 2017

Conversation

traviskaufman
Copy link
Contributor

This commit introduces a new option for publish: --message. When given
this option, lerna will use the supplied message as the commit message
when it commits updates while publishing. If no message flag is
specified, the default hard-coded messages are used.

Resolves #395

Copy link

@emmenko emmenko left a comment

Choose a reason for hiding this comment

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

I was looking for this feature, since I'm using validate-commit-msg hook 🎉

I left a comment though, as I believe the list of tags in the commit message description should not change.

@@ -310,13 +310,8 @@ export default class PublishCommand extends Command {
}

gitCommitAndTagVersionForUpdates() {
let message = "Publish" + EOL;
Copy link

Choose a reason for hiding this comment

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

Shouldn't we only change the message part? The tags part should stay the same.

# commit message now
Publish

- package-1@1.0.1
- package-2@1.1.1

# commit message with custom message
chore: release :rocket:

- package-1@1.0.1
- package-2@1.1.1

Copy link
Contributor

Choose a reason for hiding this comment

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

Afaict, this change doesn't actually seem to change the tag name, only the commit message. It's just that previously, tags was part of the commit message, so @traviskaufman changed how the tags is computed, but with the same output.

@doug-wade
Copy link
Contributor

This looks ready to merge to me 👍

@traviskaufman
Copy link
Contributor Author

As @doug-wade mention this patch should only change the commit message, leaving the tags alone. I believe this is verified since the tests I wrote for this use the same tag names as other tests and pass. If there's anything else that needs to be done let me know. Otherwise, it would be great if we could merge this soon! Our codebase is in need of it :)

@traviskaufman
Copy link
Contributor Author

Friendly ping! 😄

@traviskaufman
Copy link
Contributor Author

🔔 😄

1 similar comment
@traviskaufman
Copy link
Contributor Author

🔔 😄

Copy link
Contributor

@hzoo hzoo left a comment

Choose a reason for hiding this comment

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

Looks good to me! just need to fix the merge conflicts

This commit introduces a new option for publish: --message. When given
this option, lerna will use the supplied message as the commit message
when it commits updates while publishing. If no message flag is
specified, the default hard-coded messages are used.

Resolves lerna#395
@traviskaufman
Copy link
Contributor Author

Merge conflicts fixed. Thanks for the review!

@hzoo hzoo merged commit 7859aba into lerna:master Jan 24, 2017
@hzoo
Copy link
Contributor

hzoo commented Jan 24, 2017

Good stuff @traviskaufman!

@traviskaufman traviskaufman deleted the feat/custom-publish-commit-msg branch January 24, 2017 00:39
@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants