-
Notifications
You must be signed in to change notification settings - Fork 80
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 bump command #170
base: master
Are you sure you want to change the base?
Add bump command #170
Conversation
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.
LGTM, nice idea!
I guess the next step is to start labelling PRs with the type of change?
I tend to curate what I write in the changelog vs. what's in the PR, because the audiences are different. For one, I don't want to litter changelogs with But even for substantial changes, the PR often is more "what changes in the code" while I try to keep changelogs to "what changes for users/operators". I'm not particular on how but I would like to retain the ability to do this at the time of merging the PR when I have the context on it (vs. editing an auto-populated changelog later). |
Additionally, I also like to leave more detailed notes on specific (breaking) changes like "how to migrate" outside of the immediate list. |
c7748a8
to
7a02ae8
Compare
100% agreed, it doesn't/shouldn't prevent you from adding more things like breaking changes or migrating details. The purpose of the comment isn't to commit the modifications blindly but to offer a starting point and make sure that no PR is left behind.
I don't have a good answer either. As maintainers, we could sanitize the PR description once it gets merged but it would require some discipline. Another approach I've seen is to ask contributors to update CHANGELOG.md in the PR but it can become tedious for small changes or one-time contributors. |
yeah I explicitly don't ask for that because I want to keep control over the changelog. Changing the PR title/description might be an option. In Kubernetes there are also mechanisms to extract changelog entries from specially-formatted parts of the description. |
why not use the existing labels? Will just need to format those to be closely tied to:
and this will also encourage the maintainers to label PRs accordingly. Actually if you add this to the tool I will go through the PRs and will add labels and will start using it right away.
what is the idea with the contributors? Give some credit? I think that would be a good addition. |
yes, the goal is to acknowledge the work being done. It would be tedious to do manually but since the command already has all the data, I thought it would be nice to add. |
just used the tool and it saves a lot of time :) the only thing I would change is to not rely on the VERSION file . At the moment my workflow was: so when it relies on the VERSION file It doesn't allows re-running the tool without reverting the changes to the changelog and the version file. |
7a02ae8
to
bab1c8d
Compare
@krasi-georgiev I've implemented your suggestion to leverage existing labels. I've also added a @SuperQ I've tried to extract unnecessary code from the anonymous function. @matthiasr I've looked at Kubernetes and their tool looks for patterns in the pull request's description. Implementing something similar wouldn't be complicated IMO and we could always fallback using the pull request's title (maybe as a follow-up?). |
Line 82 in 86bdcd5
One thing that might be problematic is the at the moment it relies on the upstream repo to be called origin which wasn't in my case. I renamed it so not a big deal, but if there is another way should use that instead. |
Regarding the last comment, it isn't specific to the proposed |
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
1f7fd55
to
193cc50
Compare
I just tried the tool again when preparing the 2.13.1 release.
The only problem was that it updated the VERSION file to 2.14.0-rc.0 instead of 2.13.0 and the same for the changelog. |
@krasi-georgiev you should have run |
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
I don't think we should include this in the changelog. Just as with the general changelog, if someone wants a blow by blow account they can look at the git logs. Let's keep it to things that affect users. We could always mention them in the email only. |
Signed-off-by: Simon Pasquier <[email protected]>
Note: I have used this in 2.17 release and it is a really nice helper. |
I would love to use it in Thanos, but we follow standard CHANGELOG format: http://keepachangelog.com/en/1.0.0/ Do you think it makes sense to contribute to this PR (in sep branch) to achieve this @simonpasquier and some day keep in |
Hm, now I see so many other features I would need for this, let me sum all up:
Labels can differ too, but logic is reusable! This feels orthogonal and quite complex -> It would be easier for user to just provide new version? Otherwise it looks perfect 🤔 |
Wonder if we checked https://github.com/git-chglog/git-chglog if we could reuse it 🤗 |
@simonpasquier What needs to be done here? I'd be happy to rebase and merge this PR. |
Moving forward with release automation, I suggest to add a 'promu bump' command that updates the CHANGELOG.md file by looking at the pull requests merged since the current version. It also updates the
VERSION
file if it exists.A few examples:
promu bump
updates from "X.Y.Z" to "X.<Y+1>.0-rc.0". This is identical topromu bump --level minor --pre-release rc.0 --base-branch master
.promu bump --dry-run
, the same thing but it displays the generated changelog instead of modifying CHANGELOG.md and VERSION.promu bump --level pre --pre-release rc.1 --base-branch release-X.Y
updates from "X.Y.Z-rc.0" to "X.Y.Z-rc.1".promu bump --level pre --pre-release "" --base-branch release-X.Y
updates from "X.Y.Z-rc.x" to "X.Y.Z".promu bump --level patch --base-branch release-X.Y
updates from "X.Y.Z" to "X.Y.<Z+1>".promu bump --pre-release ""
updates from "X.Y.Z" "X.<Y+1>.0". This is for projects that don't do release candidates.To avoid rate-limiting from the GitHub API, it is possible to provide an API token using the
GITHUB_TOKEN
environment variable.The command uses PR labels to classify the change (eg a PR labelled with
bug
will turn into* [BUGFIX] <PR title>. #<PR number>
, PR labelled withkind/feature
will turn into* [FEATURE] <PR title>. #<PR number>
, and so on). Pull requests for which no label matches will be added as comments (useful to exclude cosmetic changes like typo fixes or dependency updates).Here is the output when I run
promu bump --pre-release ""
on this repository: