diff --git a/src/main/java/com/spotify/github/v3/repos/RepositoryBase.java b/src/main/java/com/spotify/github/v3/repos/RepositoryBase.java index 88592280..900af1bf 100644 --- a/src/main/java/com/spotify/github/v3/repos/RepositoryBase.java +++ b/src/main/java/com/spotify/github/v3/repos/RepositoryBase.java @@ -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 isPublic(); diff --git a/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java b/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java index 3e985a0c..dd737532 100644 --- a/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java +++ b/src/test/java/com/spotify/github/v3/clients/RepositoryClientTest.java @@ -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)); } diff --git a/src/test/java/com/spotify/github/v3/repos/RepositoryTest.java b/src/test/java/com/spotify/github/v3/repos/RepositoryTest.java index 38aa0ad8..a5cfad5b 100644 --- a/src/test/java/com/spotify/github/v3/repos/RepositoryTest.java +++ b/src/test/java/com/spotify/github/v3/repos/RepositoryTest.java @@ -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)); } } diff --git a/src/test/resources/com/spotify/github/v3/repos/repository.json b/src/test/resources/com/spotify/github/v3/repos/repository.json index 5637b300..3f6fa8a2 100644 --- a/src/test/resources/com/spotify/github/v3/repos/repository.json +++ b/src/test/resources/com/spotify/github/v3/repos/repository.json @@ -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", diff --git a/src/test/resources/com/spotify/github/v3/repos/repository_get.json b/src/test/resources/com/spotify/github/v3/repos/repository_get.json index 3e9fbf30..219e7b90 100644 --- a/src/test/resources/com/spotify/github/v3/repos/repository_get.json +++ b/src/test/resources/com/spotify/github/v3/repos/repository_get.json @@ -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",