Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PullRequestStatus.scala « github « rorschach « getbootstrap « com « scala « main « src - github.com/twbs/rorschach.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e136f325a9506b6c14f4d4f21cadb9591e596ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.getbootstrap.rorschach.github

object PullRequestStatus {
  def apply(value: String): PullRequestStatus = {
    value match {
      case Open.Value => Open
      case Closed.Value => Closed
      case _ => throw new IllegalArgumentException(s"Invalid pull request status string: ${value}")
    }
  }
}
sealed trait PullRequestStatus {
  val Value: String
}
object Open extends PullRequestStatus {
  override val Value = "open"
}
object Closed extends PullRequestStatus {
  override val Value = "closed"
}