Skip to content

Commit 1155a5b

Browse files
authored
Merge pull request #85 from vchernodon/vchernodon-patch-1
Add isArchived method handling archived property of Repository
2 parents e7837c3 + c029a8b commit 1155a5b

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

src/main/java/com/spotify/github/v3/repos/RepositoryBase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public interface RepositoryBase extends UpdateTracking {
5858
@JsonProperty("private")
5959
Boolean isPrivate();
6060

61+
/** Is it archived */
62+
@Nullable
63+
@JsonProperty("archived")
64+
Boolean isArchived();
65+
6166
/** Is it public */
6267
@JsonProperty("public")
6368
Optional<Boolean> isPublic();

src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public void getRepository() throws Exception {
106106
assertThat(repository.name(), is("Hello-World"));
107107
assertThat(repository.fullName(), is(repository.owner().login() + "/Hello-World"));
108108
assertThat(repository.isPrivate(), is(false));
109+
assertThat(repository.isArchived(), is(false));
109110
assertThat(repository.fork(), is(false));
110111
}
111112

src/test/java/com/spotify/github/v3/repos/RepositoryTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ public void testDeserialization() throws IOException {
4949
assertThat(repository.name(), is("Hello-World"));
5050
assertThat(repository.fullName(), is(repository.owner().login() + "/Hello-World"));
5151
assertThat(repository.isPrivate(), is(false));
52+
assertThat(repository.isArchived(), is(false));
5253
}
5354
}

src/test/resources/com/spotify/github/v3/repos/repository.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"full_name": "octocat/Hello-World",
2424
"description": "This your first repo!",
2525
"private": false,
26+
"archived": false,
2627
"fork": true,
2728
"url": "https://api.github.com/repos/octocat/Hello-World",
2829
"html_url": "https://github.com/octocat/Hello-World",

src/test/resources/com/spotify/github/v3/repos/repository_get.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"full_name": "octocat/Hello-World",
2424
"description": "This your first repo!",
2525
"private": false,
26+
"archived": false,
2627
"fork": false,
2728
"url": "https://api.github.com/repos/octocat/Hello-World",
2829
"html_url": "https://github.com/octocat/Hello-World",

0 commit comments

Comments
 (0)