release-plz icon indicating copy to clipboard operation
release-plz copied to clipboard

Edit release-plz PR instead of closing it

Open nahsi opened this issue 2 years ago • 1 comments

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

nahsi avatar Sep 12 '22 18:09 nahsi

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

marcoieni avatar Sep 13 '22 21:09 marcoieni

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.

marcoieni avatar Nov 21 '22 21:11 marcoieni

  • [x] github: done in https://github.com/MarcoIeni/release-plz/pull/470
  • [x] gitea: TODO

marcoieni avatar Jan 24 '23 22:01 marcoieni

  • [x] bug: https://github.com/MarcoIeni/release-plz/pull/452#issuecomment-1406151688

marcoieni avatar Jan 27 '23 08:01 marcoieni