From 3c53af1119cb3762bd6576174d637b0566eb51c3 Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Sat, 17 Aug 2024 18:24:42 +0200 Subject: [PATCH] Add support for mergify --- .github/dependabot.yml | 12 +++++++--- .mergify.yml | 50 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 .mergify.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d1f0d08..319265a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,12 @@ version: 2 updates: - - package-ecosystem: "npm" - directory: "/" + - package-ecosystem: 'npm' + directory: '/' schedule: - interval: "daily" + interval: 'daily' + allow: + - dependency-type: "all" + open-pull-requests-limit: 15 + labels: + - "waiting" + - "dependencies" diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..9487b63 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,50 @@ +pull_request_rules: + - name: automatic merge + conditions: + - and: &base_checks + - base=main + - -label~=^acceptance-tests-needed|not-ready + - "#check-failure=0" + - "#check-pending=0" + - linear-history + - and: + - "#approved-reviews-by>=2" + - "#changes-requested-reviews-by=0" + - "#review-requested=0" + actions: &merge + merge: + method: merge + - name: automatic merge on special label + conditions: + - and: *base_checks + - and: + - base=main + - "label=merge-fast" + actions: *merge + - name: automatic merge for dependabot updates + conditions: + - and: *base_checks + - and: + - base=main + - author=dependabot[bot] + - "label=waited" + actions: + merge: + method: squash + - name: ask to resolve conflict + conditions: + - conflict + actions: + comment: + message: This pull request is now in conflicts. Could you fix it? 🙏 + - name: Wait for 2 days before validating merge + actions: + label: + add: + - waited + remove: + - waiting + conditions: + - and: + - updated-at<2 days ago + - author=dependabot[bot]