-
Notifications
You must be signed in to change notification settings - Fork 317
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
Override calculated version, tag and name with input #363
Conversation
Thanks for the PR @pdcmoreira. This is an awesome addition. I'm going to give it a test run! |
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.
Tested it for a bit. The functionality is great, I have a few suggestions for improvements :)
2ae9ad6
to
57499d7
Compare
Rebased onto master and separated the manual input version from the calculated ones. |
57499d7
to
6456d95
Compare
Rebased onto master and fixed a bug with the mocked env that was leaking into other tests. |
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
6456d95
to
a397093
Compare
Rebased onto master. |
|
Co-Authored-By: Timon van Spronsen <timonvanspronsen@outlook.com>
Co-Authored-By: Timon van Spronsen <timonvanspronsen@outlook.com>
After testing this I noticed that this only works for newly created drafts. I think we should also propagate this through draft updates. This is technically a breaking change, but I would consider it a bug if we don't update the draft, so I think a minor version in this case would still be fine. |
d0e240d
to
26e4221
Compare
@pdcmoreira @Casz what do you think about propagating the release's name and tag changes in draft updates too? As mentioned in my previous comment, it's technically a breaking change, but I think it can be considered a bug fix because currently the release name and tag for draft releases won't update even though the input version might have changed. But, people might rely on this functionality to update the title or tag of a release manually without having Release Drafter override it with a draft update. What are your thoughts on this? I have a reproduction for this issue here: https://github.com/TimonVS/rd-override-version. You can test this by having Release Drafter generate a draft first and then change the input version here: https://github.com/TimonVS/rd-override-version/blob/master/.github/workflows/release-drafter.yml#L16. You'll see that the version in the body is updated but that the version in the title and tag stay the same. @pdcmoreira I rebased your PR btw so that I could test with the latest changes. |
I honestly thought it was a bug but not one I cared to report 🐛😅 Yes I think it is a bug. |
True, I think it should be considered a bug, because if the calculated version changes, it stops being semver compliant. |
Thanks for your input! I'll create a fix for it, once that's done we'll release this. I've temporarily removed the documentation in this PR so that I can merge it now without having incorrect documentation on the master branch. |
@pdcmoreira I had issues with failing tests due to
|
The mockedEnv issue disappeared. |
Allow overriding the resulting version, tag and name throught input options.
This is useful for workflows scoped by branches (#359) that need to transition a version from one branch to another - GitFlow, for example.