From 996b388df348d395d3cdce5d3c28605caacf0b15 Mon Sep 17 00:00:00 2001 From: "Frank S. Thomas" Date: Thu, 21 Dec 2023 14:46:33 +0100 Subject: [PATCH] Customize Mergify config --- .mergify.yml | 112 +++++++-------------------------------------------- build.sbt | 20 +++++++++ 2 files changed, 34 insertions(+), 98 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 10de4bc7c..e7b0dcead 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -6,108 +6,24 @@ # to meet your needs, then regenerate this file. pull_request_rules: -- name: merge scala-steward's PRs - conditions: - - author=scala-steward - - body~=labels:.*early-semver-patch - - status-success=Build and Test (ubuntu-latest, 2.12, temurin@8) - - status-success=Build and Test (ubuntu-latest, 2.13, temurin@8) - - status-success=Build and Test (ubuntu-latest, 3, temurin@8) - actions: - merge: {} -- name: Label benchmark PRs - conditions: - - files~=^modules/benchmark/ - actions: - label: - add: - - benchmark - remove: [] -- name: Label cats PRs - conditions: - - files~=^modules/cats/ - actions: - label: - add: - - cats - remove: [] -- name: Label core PRs +- name: label scala-steward's PRs conditions: - - files~=^modules/core/ + - or: + - author=scala-steward + - author=scala-steward[bot] actions: label: add: - - core + - dependency-update remove: [] -- name: Label docs PRs - conditions: - - files~=^modules/docs/ - actions: - label: - add: - - docs - remove: [] -- name: Label eval PRs - conditions: - - files~=^modules/eval/ - actions: - label: - add: - - eval - remove: [] -- name: Label jsonpath PRs - conditions: - - files~=^modules/jsonpath/ - actions: - label: - add: - - jsonpath - remove: [] -- name: Label pureconfig PRs - conditions: - - files~=^modules/pureconfig/ - actions: - label: - add: - - pureconfig - remove: [] -- name: Label scalacheck PRs - conditions: - - files~=^modules/scalacheck/ - actions: - label: - add: - - scalacheck - remove: [] -- name: Label scalaz PRs - conditions: - - files~=^modules/scalaz/ - actions: - label: - add: - - scalaz - remove: [] -- name: Label scodec PRs - conditions: - - files~=^modules/scodec/ - actions: - label: - add: - - scodec - remove: [] -- name: Label scopt PRs - conditions: - - files~=^modules/scopt/ - actions: - label: - add: - - scopt - remove: [] -- name: Label shapeless PRs +- name: merge scala-steward's PRs conditions: - - files~=^modules/shapeless/ + - or: + - author=scala-steward + - author=scala-steward[bot] + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@8) + - status-success=Build and Test (ubuntu-latest, 2.13, temurin@8) + - status-success=Build and Test (ubuntu-latest, 3, temurin@8) actions: - label: - add: - - shapeless - remove: [] + merge: + method: merge diff --git a/build.sbt b/build.sbt index 6164c3c7f..2449174db 100644 --- a/build.sbt +++ b/build.sbt @@ -112,6 +112,26 @@ ThisBuild / githubWorkflowBuild := ), WorkflowStep.Use(UseRef.Public("codecov", "codecov-action", "v1"), name = Some("Codecov")) ) +ThisBuild / mergifyPrRules := { + val authorCondition = MergifyCondition.Or( + List( + MergifyCondition.Custom("author=scala-steward"), + MergifyCondition.Custom("author=scala-steward[bot]") + ) + ) + Seq( + MergifyPrRule( + "label scala-steward's PRs", + List(authorCondition), + List(MergifyAction.Label(List("dependency-update"))) + ), + MergifyPrRule( + "merge scala-steward's PRs", + List(authorCondition) ++ mergifySuccessConditions.value, + List(MergifyAction.Merge(Some("merge"))) + ) + ) +} /// projects