release-plz
release-plz copied to clipboard
Edit release-plz PR instead of closing it
Motivations
It would be nice if instead of closing release-plz PR and opening new one release-plz were able to change existing PR similar to how it is done in release-please from google
- Would you like to implement this feature? [y/n] n
I agree with you. It would be nice! However we need to think about the strategy.
What does release-please do? Does it force push? If we force push there is the risk of overriding user commits. For example:
- release-plz open a release pr
- the developer edits the changelog in the release-pr
- something else is merged in
main
(for example a dependabot pr is merged automatically)
In this scenario what should we do? If we force-push we lose the developer edit in the changelog
What does release-please do? Does it force push?
Yes, see https://github.com/starship/starship/pull/4485 for example.
In this scenario what should we do? If we force-push we lose the developer edit in the changelog
Maybe we can check the commit history of the PR. If there's only one author (the release-plz bot), we force-push. Otherwise, we close the PR and we create a new one.
- [x] github: done in https://github.com/MarcoIeni/release-plz/pull/470
- [x] gitea: TODO
- [x] bug: https://github.com/MarcoIeni/release-plz/pull/452#issuecomment-1406151688