-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
add branch-allowlist repo-config parameter #1292
add branch-allowlist repo-config parameter #1292
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1292 +/- ##
==========================================
- Coverage 70.00% 69.97% -0.04%
==========================================
Files 74 74
Lines 5585 5606 +21
==========================================
+ Hits 3910 3923 +13
- Misses 1312 1319 +7
- Partials 363 364 +1
Continue to review full report at Codecov.
|
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.
👋 Thanks for contributing!
By writing e2e tests/running the server you should be able to figure out if there are other places to modify.
@nishkrishnan Thank you for your comment. I ran the commands locally with a test repository and confirmed that it works as expected now. As soon as the code logic is reviewed I can also take care of the documentation, but I'd prefer to split the PRs to keep their size manageable. |
This one might be in conflict with #1383 The mentioned MR looks a little bit more generic and also clear and simpler for me. |
I agree. |
Closing this in favor of: #1383 |
Context
Fixes #1028
What
This PR should add a
branch_allowlist
parameter to the RepoConfig that comes into effect in combination with themergeable
requirement.In addition to checking if a PR is mergeable it also validates that it targets a set of allowed base branches.
Otherwise one might avoid the mergeable requirement by planning and applying on a non-protected branch.
Example
I set
branch_allowlist: [master]
and tried to apply a PR that is targeting thedevelopment
branch. Error message:Looking forward to all reviews :-)