---
pull_request_rules:
  - name: remove outdated approvals
    conditions:
      - base=master
    actions:
      dismiss_reviews:
        approved: true
        changes_requested: false
  - name: automatic merge
    conditions:
      - label!=do-not-merge
      - base=master
      - "#approved-reviews-by>=2"
      - "#changes-requested-reviews-by=0"
      - status-success=check
      - status-success=test-suite
    actions:
      merge:
        method: rebase
        rebase_fallback: merge
      dismiss_reviews: {}
      delete_head_branch: {}
  - name: ask to resolve conflict
    conditions:
      - conflict
    actions:
      comment:
        message: "This pull request now has conflicts with the target branch.
        Could you please resolve conflicts and force push the corrected
        changes? 🙏"

---
pull_request_rules:
  - name: remove outdated approvals
    conditions:
      - base=master
    actions:
      dismiss_reviews:
        approved: true
        changes_requested: false
  - name: automatic merge
    conditions:
      - label!=do-not-merge
      - base=master
      - "#approved-reviews-by>=2"
      - "#changes-requested-reviews-by=0"
      - status-success=check
      # each test should be listed separately, do not use regular expressions:
      # https://docs.mergify.io/conditions.html#validating-all-status-check
      - status-success=test-suite (mimic)
      - status-success=test-suite (nautilus)
      - status-success=test-suite (octopus)
    actions:
      merge:
        method: rebase
        rebase_fallback: merge
      dismiss_reviews: {}
      delete_head_branch: {}
  - name: ask to resolve conflict
    conditions:
      - conflict
    actions:
      comment:
        message: "This pull request now has conflicts with the target branch.
        Could you please resolve conflicts and force push the corrected
        changes? 🙏"

Include all status checks explicitly in the Mergify configuration
Include all status checks explicitly in the Mergify configuration

Unfortunately it is not recommended to use a regular expression to check
for the CI status of multiple tests. In case some tests do not run and
fail to report the status, Mergify will not know something is wrong and
PRs might get merged.

The only way to make sure all status checks have passed successfully, is
to list them all separately.

See-also: https://docs.mergify.io/conditions.html#validating-all-status-check
Signed-off-by: Niels de Vos <7bda0c0ee7f47171cc808e9e60292cbc5d8140dd@redhat.com>
