Skip to content

Commit

Permalink
Merge pull request #85 from vchernodon/vchernodon-patch-1
Browse files Browse the repository at this point in the history
Add isArchived method handling archived property of Repository
  • Loading branch information
Abhi347 authored Apr 4, 2022
2 parents e7837c3 + c029a8b commit 1155a5b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/spotify/github/v3/repos/RepositoryBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ public interface RepositoryBase extends UpdateTracking {
@JsonProperty("private")
Boolean isPrivate();

/** Is it archived */
@Nullable
@JsonProperty("archived")
Boolean isArchived();

/** Is it public */
@JsonProperty("public")
Optional<Boolean> isPublic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public void getRepository() throws Exception {
assertThat(repository.name(), is("Hello-World"));
assertThat(repository.fullName(), is(repository.owner().login() + "/Hello-World"));
assertThat(repository.isPrivate(), is(false));
assertThat(repository.isArchived(), is(false));
assertThat(repository.fork(), is(false));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ public void testDeserialization() throws IOException {
assertThat(repository.name(), is("Hello-World"));
assertThat(repository.fullName(), is(repository.owner().login() + "/Hello-World"));
assertThat(repository.isPrivate(), is(false));
assertThat(repository.isArchived(), is(false));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"archived": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"archived": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
Expand Down

0 comments on commit 1155a5b

Please sign in to comment.