-
Notifications
You must be signed in to change notification settings - Fork 62
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
Use the changelog to generate an better commit message (or annotated tag) #218
Comments
That seems like it would be relatively easy. Is it just a matter of copy/pasting the changelog lines into the tag commit message? |
It seems so according to what I see in my repo and https://help.github.com/articles/about-releases/ May be instead of having
The only thing I am not clear about is that if you are logged into github and go to https://github.com/YOUR_USERNAME/YOUR_REPO/tags you will see a link in the right hand side of the screen, next to each tag which says: Add release notes I am not clear how tag annotations interact with this feature or if there is a way to feed this part of github from a git commit/tag. In any case, just the other part would be a nice improvement. |
🙌🏾 I was about to report this, and @hgrecco was faster than me for +6 years 😅 I'm also trying to automate getting the release notes from # get the lines where the changelog for the last release starts and finishes
first_line=$(grep -n "\-\-\-\-" CHANGES.rst | cut -d":" -f1 |head -n1)
last_line=$(grep -n "\-\-\-\-" CHANGES.rst | cut -d":" -f1 |head -n2 | tail -n1)
# do some math to adjust the line numbers
first=$((${first_line}+1))
last=$((${last_line}-2))
end=$((${last_line}-1))
# extract the changelog
sed -n "${first},${last}p;${end}q" CHANGES.rst > body.txt
# debug
cat body.txt
# actual release creation (so far with `-p` to mark them as pre-releases)
gh release create ${{ github.ref_name }} -p -F body.txt The whole mambo-jumbo of Then all the above would only be: gh release create ${{ github.ref_name }} --notes-from-tag ✨ 💫 How hard would it be to get the changelog on an annotated tag? 🤔 🤞🏾 |
Turns out, after a bit of digging and testing, that the |
GitHub uses the commit information (or the tag annotation) to make the release notes (see for example, https://github.com/zestsoftware/zest.releaser/releases/tag/6.10)
It would be nice to take from the corresponding section from the change log and use it.
The text was updated successfully, but these errors were encountered: