-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generate release changelog based on commits #465
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This is really cool but what I would want for |
I def think this will save us some time so I'm in favour! Manually copying the text and links and making sure the links are correct takes a bunch of time in several of the projects we release (for me at least!)! I'd be up for following some sort of naming format for PRs (which would you recommend?); it would be easy to manually copy the output from this and group things according to some format we follow, and if we get more rigerous with it then the tool could be tweaked to auto group things also. |
I think some kind of label system would help a lot such as Then we could generate a much more readable CHANGELOG because I like having different sections for bug fixes, features and so on :) |
Just to clarify, are you thinking labels as in actual github labels, or as in some text we'd add to PR titles like (I like the idea of both, and actual github labels seem like a great idea, but they would be harder for a tool like this to get hold of I think) |
I was thinking of Github labels but yeah you are right easier to parse based on commit format than Github labels |
The idea to automate completely the changelog seems like a great one! I do think that both options are really good in terms of outcome, but I tend to lean towards the labeling format. We could do something like |
I think it would be terrific if it works but I don't think it's realistic to get there in a single leap. I think we should instead aim to automate the information collection and save as many manual steps as possible while still allowing for manual intervention. People forget labels (looking at myself here!) and relying on commit message or PR title formatting is too brittle. There's a proposal for substrate labels reform up on Notion. I think it'd be good to await the evolution of that and once they're happy we should adopt the same set of labels to start normalizing things across all repos. In other words, I think we should do this step by step and this PR seems like a great first step! |
scripts/generate_changelog.sh
Outdated
tag=$($GIT_BIN describe --match "v[0-9]*" --abbrev=0 origin/master) || log_error 'Failed to obtain the latest release tag' | ||
log_info "Latest release tag: $tag" | ||
# TODO: verify that the tag is part of an actual release | ||
$GIT_BIN verify-tag "$tag" > /dev/null 2>&1 || log_error 'Failed to verify tag' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like verify-tag is all about verifyingthe signature of the tag is valid, so perhaps the log_error
could be more descriptive eg "Failed to verify tag; bad signature"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clean and works for me; nice one :)
As @dvdplm said I think this is a great first step, and it'll already save some time!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need instructions on how to use this in the RELEASING
file.
@@ -0,0 +1,50 @@ | |||
#!/usr/bin/env bash | |||
# | |||
# This script obtains the changelog to be introduced in the new release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a usage example here (and/or print the help when args are missing?)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This script is intended to automate part of the release process.
As stated in the release, the changelog should be created from closed PRs.
In this approach, the script inspects the merged PRs into the main branch
origin/master
, that is similar to what the substrate repository does.Testing Done
shellcheck ./scripts/generate_changelog.sh