|
| 1 | +--- |
| 2 | +defaults: |
| 3 | + actions: |
| 4 | + queue: |
| 5 | + name: default |
| 6 | + method: rebase |
| 7 | + update_method: rebase |
| 8 | + |
| 9 | + |
| 10 | +# each test should be listed separately, do not use regular expressions: |
| 11 | +# https://docs.mergify.io/conditions.html#validating-all-status-check |
| 12 | +# TODO: Use mergify's recently added 'shared configuration support' |
| 13 | +# to dedup some of the check-x=y repetition in the future. |
| 14 | +queue_rules: |
| 15 | + - name: default |
| 16 | + conditions: |
| 17 | + - check-success=check |
| 18 | + - check-success=build-server |
| 19 | + - check-success=build-ad-server |
| 20 | + - check-success=build-nightly-server |
| 21 | + - check-success=build-nightly-ad-server |
| 22 | + - check-success=build-client |
| 23 | + - check-success=build-toolbox |
| 24 | + - check-success=test-ad-server-kubernetes |
| 25 | + - check-success=test-nightly-ad-server-kubernetes |
| 26 | + - check-success=dpulls |
| 27 | + |
| 28 | + |
| 29 | +pull_request_rules: |
| 30 | + # Clearing approvals after content changes |
| 31 | + - name: Remove outdated approvals |
| 32 | + conditions: |
| 33 | + - base=master |
| 34 | + actions: |
| 35 | + dismiss_reviews: |
| 36 | + approved: true |
| 37 | + changes_requested: false |
| 38 | + # Perform automatic merge on conditions |
| 39 | + - name: Automatic merge on approval |
| 40 | + conditions: |
| 41 | + - check-success=check |
| 42 | + - check-success=build-server |
| 43 | + - check-success=build-ad-server |
| 44 | + - check-success=build-nightly-server |
| 45 | + - check-success=build-nightly-ad-server |
| 46 | + - check-success=build-client |
| 47 | + - check-success=build-toolbox |
| 48 | + - check-success=test-ad-server-kubernetes |
| 49 | + - check-success=test-nightly-ad-server-kubernetes |
| 50 | + - check-success=dpulls |
| 51 | + - "-draft" |
| 52 | + # Contributors should set the 'do-not-merge' label if they don't want |
| 53 | + # the PR to be (auto)merged for some reason. |
| 54 | + - "label!=do-not-merge" |
| 55 | + # A reviewer should set a label starting with 'review-in-progress' (and |
| 56 | + # suffixed by their username) in order to indicate a detailed review has |
| 57 | + # been started and not completed. This will hold the PR until the |
| 58 | + # label has been removed. |
| 59 | + - "-label~=^review-in-progress" |
| 60 | + - "base=master" |
| 61 | + # Even if there are 2 or more approvals we won't automerge if there are |
| 62 | + # any changes requested. |
| 63 | + - "#changes-requested-reviews-by=0" |
| 64 | + - or: |
| 65 | + # Any contributor's PR can be automerged with 2 (or more) reviews. |
| 66 | + - "#approved-reviews-by>=2" |
| 67 | + # A maintainer's contribution that has already aged long enough to |
| 68 | + # earn the "priority-review" label can be merged immediately. |
| 69 | + # The label can also be applied manually in case of an important |
| 70 | + # bugfix, etc. |
| 71 | + - and: |
| 72 | + - "label=priority-review" |
| 73 | + - "author=@maintainers" |
| 74 | + - "#approved-reviews-by>=1" |
| 75 | + actions: |
| 76 | + queue: {} |
| 77 | + dismiss_reviews: {} |
| 78 | + # Conflict resolution prompt |
| 79 | + - name: Ask contributor to resolve a conflict |
| 80 | + conditions: |
| 81 | + - conflict |
| 82 | + actions: |
| 83 | + comment: |
| 84 | + message: "This pull request now has conflicts with the target branch. |
| 85 | + Please resolve these conflicts and force push the updated branch." |
| 86 | + # Label PRs that have been sitting there unchanged, aging like a fine wine |
| 87 | + # |
| 88 | + # NOTE: the updated-at "counter" resets every time the PR is changed so |
| 89 | + # reacting to a reviewer's feedback and fixing a typo (for example) will |
| 90 | + # reset the counter. Thus we now apply a label once we hit the 15 day window |
| 91 | + # so that we know that PR had, at some time, sat unchanged for that long. |
| 92 | + - name: Label aged PRs |
| 93 | + conditions: |
| 94 | + - "updated-at<15 days ago" |
| 95 | + - "-draft" |
| 96 | + actions: |
| 97 | + label: |
| 98 | + add: |
| 99 | + - "priority-review" |
0 commit comments