Skip to content

Commit d3da76b

Browse files
author
da0shi
committed
Email might be null when user set their email as private
1 parent b61df6f commit d3da76b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/codecheck/github/models/User.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.json4s.JsonDSL._
77
case class User(value: JValue) extends AbstractJson(value) {
88
def login: String = get("login")
99
def id: Long = get("id").toLong
10-
def email: String = get("email")
10+
def email: Option[String] = opt("email")
1111
def name: String = get("name")
1212
def blog: String = get("blog")
1313
def company: String = get("company")
@@ -25,4 +25,4 @@ case class UserInput (
2525
location: Option[String] = None,
2626
hireable: Option[Boolean] = None,
2727
bio: Option[String] = None
28-
) extends AbstractInput
28+
) extends AbstractInput

0 commit comments

Comments
 (0)