From 4e8376282450096a262e5f776b9c1466d132e38f Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Tue, 21 Oct 2025 16:28:13 -0500 Subject: [PATCH] Add Mergify to the build --- .mergify.yml | 82 +++++++++++++++++++++++++++++++++++++++++++++ build.sbt | 6 ++++ project/plugins.sbt | 1 + 3 files changed, 89 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..930e877 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,82 @@ +# This file was automatically generated by sbt-typelevel-mergify using the +# mergifyGenerate task. You should add and commit this file to +# your git repository. It goes without saying that you shouldn't edit +# this file by hand! Instead, if you wish to make changes, you should +# change your sbt build configuration to revise the mergify configuration +# to meet your needs, then regenerate this file. + +pull_request_rules: +- name: merge scala-steward's PRs + conditions: + - author=typelevel-steward[bot] + - or: + - body~=labels:.*early-semver-patch + - body~=labels:.*early-semver-minor + - status-success=Test (ubuntu-22.04, 2.12, temurin@8) + - status-success=Test (ubuntu-22.04, 2.13, temurin@8) + actions: + merge: {} +- name: Label benchmark PRs + conditions: + - files~=^benchmark/ + actions: + label: + add: + - benchmark + remove: [] +- name: Label effect3 PRs + conditions: + - files~=^effect3/ + actions: + label: + add: + - effect3 + remove: [] +- name: Label finagle PRs + conditions: + - files~=^finagle/ + actions: + label: + add: + - finagle + remove: [] +- name: Label input PRs + conditions: + - files~=^scalafix/input/ + actions: + label: + add: + - input + remove: [] +- name: Label output PRs + conditions: + - files~=^scalafix/output/ + actions: + label: + add: + - output + remove: [] +- name: Label rules PRs + conditions: + - files~=^scalafix/rules/ + actions: + label: + add: + - rules + remove: [] +- name: Label tests PRs + conditions: + - files~=^scalafix/tests/ + actions: + label: + add: + - tests + remove: [] +- name: Label util PRs + conditions: + - files~=^util/ + actions: + label: + add: + - util + remove: [] diff --git a/build.sbt b/build.sbt index 264ad0b..3db2f84 100644 --- a/build.sbt +++ b/build.sbt @@ -148,6 +148,12 @@ ThisBuild / githubWorkflowBuild := Seq( ) ) +ThisBuild / mergifyStewardConfig ~= { + _.map { + _.withMergeMinors(true).withAuthor("typelevel-steward[bot]") + } +} + lazy val `scalafix-rules` = (project in file("scalafix/rules")) .settings(allSettings) .settings( diff --git a/project/plugins.sbt b/project/plugins.sbt index 996c4b2..0e7cb1f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.0") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.8.2") +addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.8.2") addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.9.0") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.3.1")