Skip to content

Commit

Permalink
Merge pull request #829 from iRevive/build/mergify
Browse files Browse the repository at this point in the history
build: configure Mergify
  • Loading branch information
iRevive authored Nov 4, 2024
2 parents 746542b + 57cd883 commit a53d889
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 4 deletions.
88 changes: 88 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# 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: Label documentation PRs
conditions:
- files~=^docs/
actions:
label:
add:
- documentation
remove: []
- name: Label module:core PRs
conditions:
- files~=^core/
actions:
label:
add:
- module:core
remove: []
- name: Label module:oteljava PRs
conditions:
- files~=^oteljava/
actions:
label:
add:
- module:oteljava
remove: []
- name: Label module:sdk PRs
conditions:
- files~=^sdk/
actions:
label:
add:
- module:sdk
remove: []
- name: Label module:sdk:contrib:aws PRs
conditions:
- files~=^sdk-contrib/aws/
actions:
label:
add:
- module:sdk:contrib:aws
remove: []
- name: Label module:sdk:exporter PRs
conditions:
- files~=^sdk-exporter/
actions:
label:
add:
- module:sdk:exporter
remove: []
- name: Label module:semconv PRs
conditions:
- files~=^semconv/
actions:
label:
add:
- module:semconv
remove: []
- name: Label metrics PRs
conditions:
- files~=/(metrics)/
actions:
label:
add:
- metrics
remove: []
- name: Label trace PRs
conditions:
- files~=/(trace)/
actions:
label:
add:
- trace
remove: []
- name: Label Scala Steward PRs
conditions:
- author=typelevel-steward[bot]
actions:
label:
add:
- dependencies
remove: []
31 changes: 30 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,35 @@ ThisBuild / scalaVersion := Scala213 // the default Scala

ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value

ThisBuild / mergifyStewardConfig := None
ThisBuild / mergifyLabelPaths := Map(
"module:core" -> file("core"),
"module:sdk" -> file("sdk"),
"module:sdk:exporter" -> file("sdk-exporter"),
"module:sdk:contrib:aws" -> file("sdk-contrib/aws"),
"module:oteljava" -> file("oteljava"),
"module:semconv" -> file("semconv"),
"documentation" -> file("docs")
)

ThisBuild / mergifyPrRules ++= Seq(
MergifyPrRule(
"Label metrics PRs",
List(MergifyCondition.Custom("files~=/(metrics)/")),
List(MergifyAction.Label(add = List("metrics")))
),
MergifyPrRule(
"Label trace PRs",
List(MergifyCondition.Custom("files~=/(trace)/")),
List(MergifyAction.Label(add = List("trace")))
),
MergifyPrRule(
"Label Scala Steward PRs",
List(MergifyCondition.Custom("author=typelevel-steward[bot]")),
List(MergifyAction.Label(add = List("dependencies")))
)
)

val CatsVersion = "2.11.0"
val CatsEffectVersion = "3.5.5"
val CatsMtlVersion = "1.4.0"
Expand Down Expand Up @@ -749,7 +778,7 @@ lazy val benchmarks = project
lazy val examples = project
.enablePlugins(NoPublishPlugin, JavaAgent)
.in(file("examples"))
.dependsOn(core.jvm, oteljava, sdk.jvm, `sdk-exporter`.jvm)
.dependsOn(core.jvm, oteljava, sdk.jvm, `sdk-exporter`.jvm, `sdk-exporter-prometheus`.jvm)
.settings(
name := "otel4s-examples",
libraryDependencies ++= Seq(
Expand Down
5 changes: 2 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.4")
addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.7.4")
addSbtPlugin("org.typelevel" % "sbt-typelevel-scalafix" % "0.7.4")
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.7.4")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
Expand All @@ -8,8 +9,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")
addSbtPlugin("com.github.sbt" % "sbt-javaagent" % "0.1.8")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")
addSbtPlugin(
"com.armanbilge" % "sbt-scala-native-config-brew-github-actions" % "0.3.0"
)
addSbtPlugin("com.armanbilge" % "sbt-scala-native-config-brew-github-actions" % "0.3.0")

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.15"

0 comments on commit a53d889

Please sign in to comment.