Skip to content

Commit

Permalink
Merge pull request #1954 from tpolecat/mergify_merge_on_ci_label
Browse files Browse the repository at this point in the history
Mergify: Auto merge with merge-when-ci-succeed
  • Loading branch information
jatcwang authored Nov 23, 2023
2 parents 796a522 + b752c44 commit cbc7cd3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,11 @@ pull_request_rules:
add:
- weaver
remove: []
- name: merge-when-ci-pass
conditions:
- status-success=Build and Test (ubuntu-latest, 2.12, temurin@11)
- status-success=Build and Test (ubuntu-latest, 2.13, temurin@11)
- status-success=Build and Test (ubuntu-latest, 3, temurin@11)
- label=merge-on-build-success
actions:
merge: {}
12 changes: 12 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ ThisBuild / githubWorkflowBuildPostamble ++= Seq(
)
)

ThisBuild / mergifyPrRules += MergifyPrRule(name = "merge-when-ci-pass", conditions = githubWorkflowGeneratedCI.value.flatMap {
case job if mergifyRequiredJobs.value.contains(job.id) =>
val buildSuccesses = for {
os <- job.oses
scalaVer <- job.scalas
javaSpec <- job.javas
} yield MergifyCondition.Custom(s"status-success=${job.name} ($os, $scalaVer, ${javaSpec.render})")
buildSuccesses :+ MergifyCondition.Custom("label=merge-on-build-success")
case _ => Nil
}.toList, actions = List(MergifyAction.Merge()))


// This is used in a couple places. Might be nice to separate these things out.
lazy val postgisDep = "net.postgis" % "postgis-jdbc" % postGisVersion

Expand Down

0 comments on commit cbc7cd3

Please sign in to comment.