Skip to content

Commit

Permalink
Fixes ghost users associated with pull requests, issues, releases, st…
Browse files Browse the repository at this point in the history
…atuses and comments (#144)
  • Loading branch information
juanpedromoreno authored and BenFradet committed May 22, 2017
1 parent aaee622 commit 481b054
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion github4s/shared/src/main/scala/github4s/Decoders.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Decoders {
id c.downField("id").as[Int]
name c.downField("name").as[String]
full_name c.downField("full_name").as[String]
owner c.downField("owner").as[User]
owner c.downField("owner").as[Option[User]]
priv c.downField("private").as[Boolean]
description c.downField("description").as[Option[String]]
fork c.downField("fork").as[Boolean]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ case class Issue(
html_url: String,
number: Int,
state: String,
user: User,
user: Option[User],
assignee: Option[User],
labels: List[Label] = List.empty,
locked: Option[Boolean],
Expand Down Expand Up @@ -73,7 +73,7 @@ case class Comment(
url: String,
html_url: String,
body: String,
user: User,
user: Option[User],
created_at: String,
updated_at: String)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case class PullRequestBase(
label: Option[String],
ref: String,
sha: String,
user: User,
user: Option[User],
repo: Option[Repository])

case class PullRequestFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ case class Release(
prerelease: Boolean,
created_at: String,
published_at: String,
author: User,
author: Option[User],
url: String,
html_url: String,
assets_url: String,
Expand Down Expand Up @@ -134,7 +134,7 @@ case class StatusRepository(
id: Int,
name: String,
full_name: String,
owner: User,
owner: Option[User],
`private`: Boolean,
description: Option[String],
fork: Boolean,
Expand Down
8 changes: 4 additions & 4 deletions github4s/shared/src/test/scala/github4s/utils/TestData.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ trait TestData extends DummyGithubUrls {
html_url = githubApiUrl,
number = validIssueNumber,
state = validIssueState,
user = user,
user = Some(user),
assignee = None,
labels = List.empty,
locked = None,
Expand Down Expand Up @@ -230,7 +230,7 @@ trait TestData extends DummyGithubUrls {
prerelease = false,
created_at = "2011-04-10T20:09:31Z",
published_at = "2011-04-10T20:09:31Z",
author = user,
author = Some(user),
url = githubApiUrl,
html_url = githubApiUrl,
assets_url = githubApiUrl,
Expand Down Expand Up @@ -278,7 +278,7 @@ trait TestData extends DummyGithubUrls {
id = 1,
name = validRepoName,
full_name = s"$validRepoOwner/$validRepoName",
owner = user,
owner = Some(user),
`private` = false,
description = None,
fork = false,
Expand Down Expand Up @@ -307,7 +307,7 @@ trait TestData extends DummyGithubUrls {
"https://api.github.com/repos/octocat/Hello-World/issues/comments/1",
"https: //github.com/octocat/Hello-World/issues/1347#issuecomment-1",
validCommentBody,
user,
Some(user),
"2011-04-14T16:00:49Z",
"2011-04-14T16:00:49Z"
)
Expand Down

0 comments on commit 481b054

Please sign in to comment.