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

Fix multiline commit message on release finish #51

Open
shaedrich opened this issue Jun 29, 2023 · 7 comments
Open

Fix multiline commit message on release finish #51

shaedrich opened this issue Jun 29, 2023 · 7 comments

Comments

@shaedrich
Copy link
Contributor

With the rise of CI/CD developers tend to automate stuff. Releases are no exception. To pass through a few release notes with this command in a convinient way, one would use the commit message's body. However—at least that's what gitflow-avh did—the message body is omitted and only the message title (first line of the message) is used.

@ChrisJStone
Copy link
Member

With the rise of CI/CD developers tend to automate stuff. Releases are no exception. To pass through a few release notes with this command in a convinient way, one would use the commit message's body. However—at least that's what gitflow-avh did—the message body is omitted and only the message title (first line of the message) is used.

I'm not sure I'm entirely following you on this. I have not made any changes to the code base that would have removed any functionality. Though I am not currently using any of the available hooks such as pre and post flow release. Is that what you are refering to?

@shaedrich
Copy link
Contributor Author

I'm not blaming you but gitflow-avh. Maybe, this is already fixed here after this repository was forked. In that case, I am unaware of it.

With gitflow-avh, multiline messages passed to git flow release finish 1.0.0 -m "Commit message title\n\nCommit message body would be discarded and only the commit message title used.

@ChrisJStone
Copy link
Member

Ah okay, now I'm following, I will look into this a see what needs to be done to resolve this if it is indeed an issue.

@shaedrich
Copy link
Contributor Author

Thank you :)

@ChrisJStone
Copy link
Member

Quick update

When using the git binary directly multiple -m options have to be specified to git commit and git tag in order to get multiple lines of output. I was able to find a work around for this:

git commit or git tag -m"$(printf 'title\n\nbody')"

Will print multiple lines with out needing to specify addition -m options. However release finish -m does not.

@ChrisJStone
Copy link
Member

The above workaround will now work when running git flow release finish or hotfix finish with -m. The 2.1.0-SNAPSHOT release contains the fix or you can update your copy of develop. As a side note -m only applies to the generated TAG messages and does not touch the merge commit messages. I will need to do some more work if this was needed with the merge commits.

@shaedrich
Copy link
Contributor Author

Thanks a lot. Your changes from #55 should work fine for me. Nonetheless, now that you are mentioning, however, not particularily required by me, it would be worth considering implementing the ability to change the merge commit message separately from this issue 🤔

@ChrisJStone ChrisJStone moved this from 🆕 New to ✅ Done in gitflow-cjs Jul 1, 2023
@ChrisJStone ChrisJStone removed the status in gitflow-cjs Jul 2, 2023
@ChrisJStone ChrisJStone moved this to ✅ Done in gitflow-cjs Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants