File tree Expand file tree Collapse file tree
src/main/scala/org/typelevel/sbt/gha Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ mimaBinaryIssueFilters ++= Seq(
66 " org.typelevel.sbt.gha.WorkflowStep#Sbt.*" ,
77 " org.typelevel.sbt.gha.WorkflowStep#Run.*" ,
88 " org.typelevel.sbt.gha.WorkflowStep#Use.*" ,
9- " org.typelevel.sbt.gha.Permissions#Specify.*"
9+ " org.typelevel.sbt.gha.Permissions#Specify.*" ,
10+ " org.typelevel.sbt.gha.Concurrency.*"
1011).map(ProblemFilters .exclude[ReversedMissingMethodProblem ](_))
Original file line number Diff line number Diff line change @@ -18,15 +18,28 @@ package org.typelevel.sbt.gha
1818
1919sealed abstract class Concurrency {
2020 def group : String
21- def cancelInProgress : Option [Boolean ]
21+ def cancelInProgressExpr : Option [String ]
22+
23+ @ deprecated(" Use cancelInProgressExpr" , " 0.8.5" )
24+ def cancelInProgress : Option [Boolean ] = cancelInProgressExpr match {
25+ case Some (" false" ) => Some (false )
26+ case Some (" true" ) => Some (true )
27+ case _ => None
28+ }
2229}
2330
2431object Concurrency {
32+ def apply (group : String , cancelInProgress : Boolean ): Concurrency =
33+ apply(group, Some (cancelInProgress))
2534
2635 def apply (group : String , cancelInProgress : Option [Boolean ] = None ): Concurrency =
36+ Impl (group, cancelInProgress.map(_.toString))
37+
38+ def apply (group : String , cancelInProgress : Option [String ])(
39+ implicit dummy : DummyImplicit ): Concurrency =
2740 Impl (group, cancelInProgress)
2841
29- private final case class Impl (group : String , cancelInProgress : Option [Boolean ])
42+ private final case class Impl (group : String , cancelInProgressExpr : Option [String ])
3043 extends Concurrency {
3144 override def productPrefix = " Concurrency"
3245 }
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ object GenerativePlugin extends AutoPlugin {
173173 }
174174
175175 def compileConcurrency (concurrency : Concurrency ): String =
176- concurrency.cancelInProgress match {
176+ concurrency.cancelInProgressExpr match {
177177 case Some (value) =>
178178 val fields = s """ group: ${wrap(concurrency.group)}
179179 |cancel-in-progress: ${wrap(value.toString)}""" .stripMargin
You can’t perform that action at this time.
0 commit comments