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

github.com/twbs/rorschach.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/com/getbootstrap/rorschach/github/PullRequestStatus.scala')
-rw-r--r--src/main/scala/com/getbootstrap/rorschach/github/PullRequestStatus.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/scala/com/getbootstrap/rorschach/github/PullRequestStatus.scala b/src/main/scala/com/getbootstrap/rorschach/github/PullRequestStatus.scala
new file mode 100644
index 0000000..e136f32
--- /dev/null
+++ b/src/main/scala/com/getbootstrap/rorschach/github/PullRequestStatus.scala
@@ -0,0 +1,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"
+}