Skip to content

Commit

Permalink
add update Mergify action
Browse files Browse the repository at this point in the history
  • Loading branch information
bpholt committed Jul 1, 2022
1 parent 0e2b95c commit d478996
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.sbt.mergify

import io.circe.Encoder
import io.circe._
import io.circe.syntax._

sealed abstract class MergifyAction {
Expand All @@ -29,6 +29,7 @@ object MergifyAction {
case merge: Merge => merge.asJson
case label: Label => label.asJson
case requestReviews: RequestReviews => requestReviews.asJson
case Update => Update.asJson
case _ => sys.error("should not happen")
}

Expand Down Expand Up @@ -67,6 +68,12 @@ object MergifyAction {
Encoder.forProduct1("users")(_.users)
}

final case object Update extends MergifyAction {
override private[mergify] def name = "update"

implicit def encoder: Encoder[Update.type] = Encoder[JsonObject].contramap(_ => JsonObject.empty)
}

private[this] object Dummy extends MergifyAction

}

0 comments on commit d478996

Please sign in to comment.