Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mergify: Auto merge with merge-when-ci-succeed #1954

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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