diff --git a/.github/mergify.yml b/.github/mergify.yml index 65b44e17..f27bf0a2 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,22 +1,35 @@ # The `check-success` should be specifying the final job in the CI workflow assuming it depends # directly or indirectly on all other jobs passing. +shared: + # Rules applicable to both queueing and merge requests. + compulsory: &compulsory + + # Ensure the minimal CI checks have passed. + - check-success=DCO + - check-success=Package + + # Ensure we're targetting the default branch. + - base=main + + # Ensure we have adequete reviews. + - "#approved-reviews-by>=1" + - "#changes-requested-reviews-by=0" + queue_rules: - name: default conditions: - - check-success=DCO - - check-success=package + - and: *compulsory pull_request_rules: - - name: Automatic merge on approval + - name: Automatic merge conditions: - - base=main - - "#approved-reviews-by>=1" - - "#changes-requested-reviews-by=0" - - check-success=DCO - - check-success=package + - and: *compulsory + + # Ensure the review is opted in using labels. - label!=do-not-merge - label=ready-to-merge + actions: queue: method: merge