diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 000000000..3fd6ca51b --- /dev/null +++ b/.mergify.yml @@ -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: [] diff --git a/build.sbt b/build.sbt index e372fa5b4..9bd41ec37 100644 --- a/build.sbt +++ b/build.sbt @@ -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" @@ -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( diff --git a/project/plugins.sbt b/project/plugins.sbt index cf25aeac1..5a49eb70b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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") @@ -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"