Skip to content

Commit

Permalink
chore: apply mergify rules to v2-main branch (#11939)
Browse files Browse the repository at this point in the history
The same set of mergify rules are used for 'master' and 'v2-main'
branches.

With these changes, regular PRs from contributors get auto-merged. This
is currently not the case.

This also removes any special rules for v2 and reduces the number of
rules.
  • Loading branch information
Niranjan Jayakar authored Dec 9, 2020
1 parent 3530e8c commit 6f306ad
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pull_request_rules:
commit_message: title+body
conditions:
- base!=release
- -base~=^v2
- -title~=(WIP|wip)
- -label~=(blocked|do-not-merge|no-squash|two-approvers)
- -merged
Expand All @@ -34,15 +33,14 @@ pull_request_rules:
- name: automatic merge (2+ approvers)
actions:
comment:
message: Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
message: Thank you for contributing! Your pull request will be automatically updated and merged (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
merge:
strict: smart
method: squash
strict_method: merge
commit_message: title+body
conditions:
- base!=release
- -base~=^v2
- -title~=(WIP|wip)
- label~=two-approvers
- -label~=(blocked|do-not-merge|no-squash)
Expand All @@ -58,15 +56,14 @@ pull_request_rules:
- name: automatic merge (no-squash)
actions:
comment:
message: Thank you for contributing! Your pull request will be updated from master and then merged automatically without squashing (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
message: Thank you for contributing! Your pull request will be automatically updated and merged without squashing (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
merge:
strict: smart
# Merge instead of squash
method: merge
strict_method: merge
commit_message: title+body
conditions:
- -base~=^v2
- -title~=(WIP|wip)
- -label~=(blocked|do-not-merge)
# Only if no-squash is set
Expand Down Expand Up @@ -121,22 +118,4 @@ pull_request_rules:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- name: automatic merge of v2 forward merges
actions:
comment:
message: Forward merge successful!
merge:
method: merge
strict: smart+fasttrack
strict_method: merge
commit_message: title+body
conditions:
- base=v2-main
- label~=forward-merge
- -label~=(blocked|do-not-merge)
- -merged
- -closed
- author~=aws-cdk-automation
- "#approved-reviews-by>=1"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr

0 comments on commit 6f306ad

Please sign in to comment.