backport-action
backport-action copied to clipboard
feat: allow to backport unmerged prs
This pull request is still a work in progress, but I wanted to share my first iteration to get feedback early on:
- Whether it generally makes sense and if you want to merge it with your upstream.
- If the technical design of the feature makes sense.
User story
As a user, I want to backport a PR that is still WIP and not merged with the master
branch to allow running the CI on my maintenance branches.
Open tasks
I think the following topics still need to be addressed (is there even more I might not know yet?):
- [ ] Improve naming newly introduced config properties (I'm open to any ideas).
- [ ] Add tests.
- [ ] Write documentation.
Thanks @tasso94 ❤️
💭 It's important that backport-action doesn't automatically backport unmerged pull requests, as this could be unsafe in some repository workflows. But I do see that this could be useful to some as well. It should be a decision that the repository maintainer(s) can make.
👍 So I like the idea of adding this as an input, where the default behavior disallows backporting unmerged pull requests.
👍 I think the technical design makes sense.
🔧 We can clarify in the issue comment that the maintainer can use this input to allow unmerged pull requests.
[!IMPORTANT] Maintainers who want to enforce this input must avoid using the
pull_request
event to run the backport action. Thepull_request
event could allow the pull request author to flip the input flag before the pull request is approved and merged. Thepull_request_target
event prevents this. Note that backport-action promotes using thepull_request_target
event in its readme.