Skip to content

Commit

Permalink
Customize Mergify config
Browse files Browse the repository at this point in the history
  • Loading branch information
fthomas committed Dec 21, 2023
1 parent 657ebae commit 996b388
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 98 deletions.
112 changes: 14 additions & 98 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 20 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 996b388

Please sign in to comment.