Skip to content
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

feat: allow to backport unmerged prs #411

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tasso94
Copy link
Contributor

@tasso94 tasso94 commented Jan 25, 2024

This pull request is still a work in progress, but I wanted to share my first iteration to get feedback early on:

  1. Whether it generally makes sense and if you want to merge it with your upstream.
  2. 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.

@korthout
Copy link
Owner

korthout commented Feb 25, 2024

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. The pull_request event could allow the pull request author to flip the input flag before the pull request is approved and merged. The pull_request_target event prevents this. Note that backport-action promotes using the pull_request_target event in its readme.

@korthout korthout mentioned this pull request May 9, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants