From 9230f695f4927b745e1c9989c8b4f51932feea58 Mon Sep 17 00:00:00 2001 From: Xavier Portilla Edo Date: Fri, 5 Apr 2024 11:45:53 +0200 Subject: [PATCH] ci(Mergify): configuration update (#249) Signed-off-by: Xavier Portilla Edo --- .mergify.yml | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 00000000..902c5da9 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,61 @@ +pull_request_rules: + - name: Make sure PR are up to date before merging with rebase + description: >- + This automatically rebases PRs when they are out-of-date with the base + branch to avoid semantic conflicts (next step is using a merge queue). + conditions: [] + actions: + rebase: + - name: Ping PR author when conflicting + description: Warn the pull request author when their PR are conflicting + conditions: + - conflict + - '-closed' + actions: + comment: + message: > + 👋 {{author}} your PR is conflicting and needs to be updated to be + merged + - name: Assign t-shirt size to PR + description: >- + Assign a t-shirt size label to a pull request based on the number of lines + changed. + conditions: + - '#modified-lines >= 100' + - '#modified-lines < 500' + actions: + label: + toggle: + - size/L + - name: Add a queue label when PR is queued + description: Toggle the queue label when a pull request is (un)queued. + conditions: + - queue-position > 0 + actions: + label: + toggle: + - merge-queued + - name: Notify when a PR is removed from the queue + description: >- + Notify the PR author when its pull request is removed from the merge + queue. + conditions: + - queue-dequeue-reason != none + - queue-dequeue-reason != pr-merged + actions: + comment: + message: > + Hey @{{author}}, your pull request has been dequeued due to the + following reason: {{queue_dequeue_reason}}. + + Sorry about that, but you can requeue the PR by using `@mergifyio + requeue` if you think this was a mistake. + - name: Label conflicting pull requests + description: Add a label to a pull request with conflict to spot it easily + conditions: + - conflict + - '-closed' + actions: + label: + toggle: + - conflict