diff --git a/.mergify.yml b/.mergify.yml index 5ad0d9c..a592baa 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -32,3 +32,21 @@ pull_request_rules: - label!=do-not-merge actions: queue: + + - name: flag non breaking changes + conditions: + - check-success~=^test / binary-compatibility + - -check-pending~=^test / binary-compatibility + - -check-failure~=^test / binary-compatibility + actions: + label: + toggle: + - non-breaking-change + + - name: flag binary incompatible changes + conditions: + - check-failure~=^test / binary-compatibility + actions: + label: + toggle: + - release-bump-needed diff --git a/README.md b/README.md index ff0ff7c..ee14560 100644 --- a/README.md +++ b/README.md @@ -176,10 +176,18 @@ jobs: ## Merge queue (Mergify) Rebases an approved pull request on the default branch, reruns its CI, then merges it. `scala-steward` -updates are queued without an approval. +updates are queued without an approval. Also labels a pull request `non-breaking-change` or +`release-bump-needed` from the outcome of the binary compatibility checks. ### Setup +Create the two labels if the project doesn't have them: + +```sh +gh label create non-breaking-change -d "binary compatible with the current release" -c 0e8a16 +gh label create release-bump-needed -d "breaks binary compatibility, needs a major release" -c d93f0b +``` + Install the Mergify app on the project and on this repository, then create `.mergify.yml`: ```yaml