From 7fee1fcc74346aa91c8c8ddba761b8de1b2e203d Mon Sep 17 00:00:00 2001 From: Rob Rodrigues Date: Wed, 18 Nov 2020 17:26:43 -0800 Subject: [PATCH 01/10] Add affiliation filter for collaborators --- .../java/org/kohsuke/github/GHRepository.java | 47 ++++++++++++++++++- .../org/kohsuke/github/GitHubRequest.java | 33 +++++++++---- .../org/kohsuke/github/GHRepositoryTest.java | 11 +++++ ...ub4j-test-org_jenkins_collaborators-4.json | 4 +- ...org_github-api_collaborators-5-ddaa82.json | 4 +- ...j-test-org_github-api_collaborators-4.json | 4 +- ...j-test-org_github-api_collaborators-4.json | 4 +- 7 files changed, 88 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 8fd467e7e..6d7ed95f2 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -814,6 +814,13 @@ public class GHRepository extends GHObject { return size; } + /** + * Affiliation of a repository collaborator + */ + public enum CollaboratorAffiliation { + ALL, DIRECT, OUTSIDE + } + /** * Gets the collaborators on this repository. This set always appear to include the owner. * @@ -823,7 +830,7 @@ public class GHRepository extends GHObject { */ @WithBridgeMethods(Set.class) public GHPersonSet getCollaborators() throws IOException { - return new GHPersonSet(listCollaborators().toList()); + return new GHPersonSet(listCollaborators(CollaboratorAffiliation.ALL).toList()); } /** @@ -834,7 +841,22 @@ public class GHRepository extends GHObject { * the io exception */ public PagedIterable listCollaborators() throws IOException { - return listUsers("collaborators"); + return listCollaborators(CollaboratorAffiliation.ALL); + } + + /** + * Lists up the collaborators on this repository. + * + * @param affiliation + * Filter users by affiliation + * @return Users paged iterable + * @throws IOException + * the io exception + */ + public PagedIterable listCollaborators(CollaboratorAffiliation affiliation) throws IOException { + Map args = new HashMap<>(); + args.put("affiliation", affiliation.toString().toLowerCase()); + return listUsers("collaborators", args); } /** @@ -873,10 +895,25 @@ public class GHRepository extends GHObject { * the io exception */ public Set getCollaboratorNames() throws IOException { + return getCollaboratorNames(CollaboratorAffiliation.ALL); + } + + /** + * Gets the names of the collaborators on this repository. This method deviates from the principle of this library + * but it works a lot faster than {@link #getCollaborators()}. + * + * @param affiliation + * Filter users by affiliation + * @return the collaborator names + * @throws IOException + * the io exception + */ + public Set getCollaboratorNames(CollaboratorAffiliation affiliation) throws IOException { Set r = new HashSet<>(); // no initializer - we just want to the logins PagedIterable users = root.createRequest() .withUrlPath(getApiTailUrl("collaborators")) + .with("affiliation", affiliation.toString().toLowerCase()) .toIterable(GHUser[].class, null); for (GHUser u : users.toArray()) { r.add(u.login); @@ -2075,8 +2112,14 @@ public class GHRepository extends GHObject { } private PagedIterable listUsers(final String suffix) { + Map defaultArgs = Collections.EMPTY_MAP; + return listUsers(suffix, defaultArgs); + } + + private PagedIterable listUsers(final String suffix, Map args) { return root.createRequest() .withUrlPath(getApiTailUrl(suffix)) + .with(args) .toIterable(GHUser[].class, item -> item.wrapUp(root)); } diff --git a/src/main/java/org/kohsuke/github/GitHubRequest.java b/src/main/java/org/kohsuke/github/GitHubRequest.java index 8661d10a8..61018f865 100644 --- a/src/main/java/org/kohsuke/github/GitHubRequest.java +++ b/src/main/java/org/kohsuke/github/GitHubRequest.java @@ -75,7 +75,7 @@ class GitHubRequest { /** * Create a new {@link Builder}. - * + * * @return a new {@link Builder}. */ public static Builder newBuilder() { @@ -165,7 +165,7 @@ class GitHubRequest { /** * The base GitHub API URL for this request represented as a {@link String} - * + * * @return the url string */ @Nonnull @@ -176,7 +176,7 @@ class GitHubRequest { /** * The url path to be added to the {@link #apiUrl()} for this request. If this does not start with a "/", it instead * represents the full url string for this request. - * + * * @return a url path or full url string */ @Nonnull @@ -186,7 +186,7 @@ class GitHubRequest { /** * The content type to to be sent by this request. - * + * * @return the content type. */ @Nonnull @@ -196,7 +196,7 @@ class GitHubRequest { /** * The {@link InputStream} to be sent as the body of this request. - * + * * @return the {@link InputStream}. */ @CheckForNull @@ -206,7 +206,7 @@ class GitHubRequest { /** * The {@link URL} for this request. This is the actual URL the {@link GitHubClient} will send this request to. - * + * * @return the request {@link URL} */ @Nonnull @@ -216,7 +216,7 @@ class GitHubRequest { /** * Whether arguments for this request should be included in the URL or in the body of the request. - * + * * @return true if the arguements should be sent in the body of the request. */ public boolean inBody() { @@ -226,7 +226,7 @@ class GitHubRequest { /** * Create a {@link Builder} from this request. Initial values of the builder will be the same as this * {@link GitHubRequest}. - * + * * @return a {@link Builder} based on this request. */ public Builder toBuilder() { @@ -346,7 +346,7 @@ class GitHubRequest { /** * Builds a {@link GitHubRequest} from this builder. - * + * * @return a {@link GitHubRequest} * @throws MalformedURLException * if the GitHub API URL cannot be constructed @@ -437,6 +437,21 @@ class GitHubRequest { return withHeader("Accept", name); } + /** + * With requester. + * + * @param Map + * map of key value pairs to add + * @return the request builder + */ + public B with(Map map) { + for (Map.Entry entry : map.entrySet()) { + with(entry.getKey(), entry.getValue()); + } + + return (B) this; + } + /** * With requester. * diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index 2ea784e18..5eb0038ea 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -2,6 +2,7 @@ package org.kohsuke.github; import com.fasterxml.jackson.databind.JsonMappingException; import org.apache.commons.io.IOUtils; +import org.junit.Ignore; import org.junit.Test; import java.io.FileNotFoundException; @@ -645,6 +646,16 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest { assertThat(collaborators.size(), greaterThan(10)); } + @Test + @Ignore("Data not cached") + public void listCollaboratorsFiltered() throws Exception { + GHRepository repo = getRepository(); + List allCollaborators = repo.listCollaborators().toList(); + List filteredCollaborators = repo.listCollaborators(GHRepository.CollaboratorAffiliation.OUTSIDE) + .toList(); + assertThat(allCollaborators.size(), greaterThan(filteredCollaborators.size())); + } + @Test public void getCheckRuns() throws Exception { final int expectedCount = 8; diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json index 68656bb54..2977a3ac7 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json @@ -2,7 +2,7 @@ "id": "bce97482-6a11-44e5-a112-29230b142636", "name": "repos_hub4j-test-org_jenkins_collaborators", "request": { - "url": "/repos/hub4j-test-org/jenkins/collaborators", + "url": "/repos/hub4j-test-org/jenkins/collaborators?affiliation=all", "method": "GET", "headers": { "Accept": { @@ -44,4 +44,4 @@ "uuid": "bce97482-6a11-44e5-a112-29230b142636", "persistent": true, "insertionIndex": 4 -} \ No newline at end of file +} diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json index d0c47d67c..abb0751cb 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json @@ -2,7 +2,7 @@ "id": "ddaa8229-c0ae-4df6-90ed-08425bfe71f2", "name": "repos_hub4j-test-org_github-api_collaborators", "request": { - "url": "/repos/hub4j-test-org/github-api/collaborators", + "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=all", "method": "GET", "headers": { "Accept": { @@ -38,4 +38,4 @@ "uuid": "ddaa8229-c0ae-4df6-90ed-08425bfe71f2", "persistent": true, "insertionIndex": 5 -} \ No newline at end of file +} diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json index 12be7d0f4..b51323f2e 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json @@ -2,7 +2,7 @@ "id": "2b8badfb-52b8-4304-a9a5-66b80274e93d", "name": "repos_hub4j-test-org_github-api_collaborators", "request": { - "url": "/repos/hub4j-test-org/github-api/collaborators", + "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=all", "method": "GET", "headers": { "Accept": { @@ -44,4 +44,4 @@ "uuid": "2b8badfb-52b8-4304-a9a5-66b80274e93d", "persistent": true, "insertionIndex": 4 -} \ No newline at end of file +} diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json index 2a64c7281..3f6b23699 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json @@ -2,7 +2,7 @@ "id": "b0680d17-cd3b-4ec0-a857-d352c7167e94", "name": "repos_hub4j-test-org_github-api_collaborators", "request": { - "url": "/repos/hub4j-test-org/github-api/collaborators", + "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=all", "method": "GET", "headers": { "Accept": { @@ -44,4 +44,4 @@ "uuid": "b0680d17-cd3b-4ec0-a857-d352c7167e94", "persistent": true, "insertionIndex": 4 -} \ No newline at end of file +} From 1b8d131915db71d515f7300b9a9672ee0e92217b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 02:00:23 +0000 Subject: [PATCH 02/10] Chore(deps-dev): Bump mockito-core from 3.6.0 to 3.6.28 Bumps [mockito-core](https://github.com/mockito/mockito) from 3.6.0 to 3.6.28. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.6.0...v3.6.28) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df5887a68..be264c840 100644 --- a/pom.xml +++ b/pom.xml @@ -537,7 +537,7 @@ org.mockito mockito-core - 3.6.0 + 3.6.28 test From 6f5d3c32c345f2cc6cb0f2199011c9a7418dd324 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 1 Dec 2020 10:07:46 -0800 Subject: [PATCH 03/10] Spotbugs 4.1.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index be264c840..a7de93589 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ UTF-8 4.0.4 - 4.1.2 + 4.1.3 true 2.2 4.4.1 From 6eac15df0f5c9598e319355e7e07aebf6e9d96f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 18:21:10 +0000 Subject: [PATCH 04/10] Chore(deps): Bump maven-project-info-reports-plugin from 3.1.0 to 3.1.1 Bumps [maven-project-info-reports-plugin](https://github.com/apache/maven-project-info-reports-plugin) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/apache/maven-project-info-reports-plugin/releases) - [Commits](https://github.com/apache/maven-project-info-reports-plugin/compare/maven-project-info-reports-plugin-3.1.0...maven-project-info-reports-plugin-3.1.1) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7de93589..8c73f841a 100644 --- a/pom.xml +++ b/pom.xml @@ -261,7 +261,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.0 + 3.1.1 org.apache.bcel From c3869bee31ceab48a62426966ebcdfbf05810813 Mon Sep 17 00:00:00 2001 From: Rob Rodrigues Date: Tue, 1 Dec 2020 19:50:24 -0800 Subject: [PATCH 05/10] Reverted changes which added filter unnecessarily, cleanup, add test cache, enable test --- CONTRIBUTING.md | 4 + .../java/org/kohsuke/github/GHRepository.java | 26 +- .../org/kohsuke/github/GHRepositoryTest.java | 4 +- ...ub4j-test-org_jenkins_collaborators-4.json | 2 +- ...org_github-api_collaborators-5-ddaa82.json | 2 +- ...j-test-org_github-api_collaborators-4.json | 2 +- ...j-test-org_github-api_collaborators-4.json | 2 +- .../__files/orgs_hub4j-test-org-2.json | 48 ++ .../repos_hub4j-test-org_github-api-3.json | 332 +++++++++++ ...j-test-org_github-api_collaborators-4.json | 552 ++++++++++++++++++ ...j-test-org_github-api_collaborators-5.json | 27 + .../__files/user-1.json | 46 ++ .../mappings/orgs_hub4j-test-org-2.json | 47 ++ .../repos_hub4j-test-org_github-api-3.json | 47 ++ ...j-test-org_github-api_collaborators-4.json | 46 ++ ...j-test-org_github-api_collaborators-5.json | 46 ++ .../mappings/user-1.json | 47 ++ 17 files changed, 1264 insertions(+), 16 deletions(-) create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/user-1.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0de9d96e7..2a62ec1a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,10 @@ Example: This the default behavior. +Example for a single test case: + +`mvn install -Dtest=WireMockStatusReporterTest#user_whenProxying_AuthCorrectlyConfigured` + ### Setting up credential diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index aa046c7f3..c6a535aac 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -834,7 +834,7 @@ public class GHRepository extends GHObject { */ @WithBridgeMethods(Set.class) public GHPersonSet getCollaborators() throws IOException { - return new GHPersonSet(listCollaborators(CollaboratorAffiliation.ALL).toList()); + return new GHPersonSet(listCollaborators().toList()); } /** @@ -845,7 +845,7 @@ public class GHRepository extends GHObject { * the io exception */ public PagedIterable listCollaborators() throws IOException { - return listCollaborators(CollaboratorAffiliation.ALL); + return listUsers("collaborators"); } /** @@ -899,7 +899,15 @@ public class GHRepository extends GHObject { * the io exception */ public Set getCollaboratorNames() throws IOException { - return getCollaboratorNames(CollaboratorAffiliation.ALL); + Set r = new HashSet<>(); + // no initializer - we just want to the logins + PagedIterable users = root.createRequest() + .withUrlPath(getApiTailUrl("collaborators")) + .toIterable(GHUser[].class, null); + for (GHUser u : users.toArray()) { + r.add(u.login); + } + return r; } /** @@ -2129,15 +2137,15 @@ public class GHRepository extends GHObject { } private PagedIterable listUsers(final String suffix) { - Map defaultArgs = Collections.EMPTY_MAP; - return listUsers(suffix, defaultArgs); + return listUsers(root.createRequest(), suffix); } private PagedIterable listUsers(final String suffix, Map args) { - return root.createRequest() - .withUrlPath(getApiTailUrl(suffix)) - .with(args) - .toIterable(GHUser[].class, item -> item.wrapUp(root)); + return listUsers(root.createRequest().with(args), suffix); + } + + private PagedIterable listUsers(Requester requester, final String suffix) { + return requester.withUrlPath(getApiTailUrl(suffix)).toIterable(GHUser[].class, item -> item.wrapUp(root)); } /** diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index 5eb0038ea..d211239d9 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -2,7 +2,6 @@ package org.kohsuke.github; import com.fasterxml.jackson.databind.JsonMappingException; import org.apache.commons.io.IOUtils; -import org.junit.Ignore; import org.junit.Test; import java.io.FileNotFoundException; @@ -647,13 +646,12 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest { } @Test - @Ignore("Data not cached") public void listCollaboratorsFiltered() throws Exception { GHRepository repo = getRepository(); List allCollaborators = repo.listCollaborators().toList(); List filteredCollaborators = repo.listCollaborators(GHRepository.CollaboratorAffiliation.OUTSIDE) .toList(); - assertThat(allCollaborators.size(), greaterThan(filteredCollaborators.size())); + assertThat(filteredCollaborators.size(), lessThan(allCollaborators.size())); } @Test diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json index 2977a3ac7..ce1234560 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testMembership/mappings/repos_hub4j-test-org_jenkins_collaborators-4.json @@ -2,7 +2,7 @@ "id": "bce97482-6a11-44e5-a112-29230b142636", "name": "repos_hub4j-test-org_jenkins_collaborators", "request": { - "url": "/repos/hub4j-test-org/jenkins/collaborators?affiliation=all", + "url": "/repos/hub4j-test-org/jenkins/collaborators", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json index abb0751cb..4e4b104e1 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/addCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-5-ddaa82.json @@ -2,7 +2,7 @@ "id": "ddaa8229-c0ae-4df6-90ed-08425bfe71f2", "name": "repos_hub4j-test-org_github-api_collaborators", "request": { - "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=all", + "url": "/repos/hub4j-test-org/github-api/collaborators", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json index b51323f2e..ccee9b84b 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/getCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json @@ -2,7 +2,7 @@ "id": "2b8badfb-52b8-4304-a9a5-66b80274e93d", "name": "repos_hub4j-test-org_github-api_collaborators", "request": { - "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=all", + "url": "/repos/hub4j-test-org/github-api/collaborators", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json index 3f6b23699..42a96aebd 100644 --- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaborators/mappings/repos_hub4j-test-org_github-api_collaborators-4.json @@ -2,7 +2,7 @@ "id": "b0680d17-cd3b-4ec0-a857-d352c7167e94", "name": "repos_hub4j-test-org_github-api_collaborators", "request": { - "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=all", + "url": "/repos/hub4j-test-org/github-api/collaborators", "method": "GET", "headers": { "Accept": { diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 000000000..134ff9e6e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 13, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 2, + "owned_private_repos": 2, + "private_gists": 0, + "disk_usage": 152, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_can_create_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 21, + "seats": 3 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api-3.json new file mode 100644 index 000000000..cf37d5c8a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api-3.json @@ -0,0 +1,332 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "hub4j-test-org/github-api", + "private": false, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/github-api", + "description": "Resetting", + "fork": true, + "url": "https://api.github.com/repos/hub4j-test-org/github-api", + "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2020-06-10T23:27:59Z", + "pushed_at": "2020-09-03T19:05:17Z", + "git_url": "git://github.com/hub4j-test-org/github-api.git", + "ssh_url": "git@github.com:hub4j-test-org/github-api.git", + "clone_url": "https://github.com/hub4j-test-org/github-api.git", + "svn_url": "https://github.com/hub4j-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 19052, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 5, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 5, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "temp_clone_token": "", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": false, + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-12-01T18:07:50Z", + "pushed_at": "2020-12-01T18:21:13Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 25457, + "stargazers_count": 718, + "watchers_count": 718, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 512, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 86, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 512, + "open_issues": 86, + "watchers": 718, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "hub4j/github-api", + "private": false, + "owner": { + "login": "hub4j", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j", + "html_url": "https://github.com/hub4j", + "followers_url": "https://api.github.com/users/hub4j/followers", + "following_url": "https://api.github.com/users/hub4j/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j/orgs", + "repos_url": "https://api.github.com/users/hub4j/repos", + "events_url": "https://api.github.com/users/hub4j/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/hub4j/github-api", + "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", + "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", + "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j/github-api/events", + "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", + "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", + "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", + "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", + "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", + "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2020-12-01T18:07:50Z", + "pushed_at": "2020-12-01T18:21:13Z", + "git_url": "git://github.com/hub4j/github-api.git", + "ssh_url": "git@github.com:hub4j/github-api.git", + "clone_url": "https://github.com/hub4j/github-api.git", + "svn_url": "https://github.com/hub4j/github-api", + "homepage": "https://github-api.kohsuke.org/", + "size": 25457, + "stargazers_count": 718, + "watchers_count": 718, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 512, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 86, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 512, + "open_issues": 86, + "watchers": 718, + "default_branch": "master" + }, + "network_count": 512, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-4.json new file mode 100644 index 000000000..149bc74f2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-4.json @@ -0,0 +1,552 @@ +[ + { + "login": "vbehar", + "id": 6251, + "node_id": "MDQ6VXNlcjYyNTE=", + "avatar_url": "https://avatars0.githubusercontent.com/u/6251?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vbehar", + "html_url": "https://github.com/vbehar", + "followers_url": "https://api.github.com/users/vbehar/followers", + "following_url": "https://api.github.com/users/vbehar/following{/other_user}", + "gists_url": "https://api.github.com/users/vbehar/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vbehar/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vbehar/subscriptions", + "organizations_url": "https://api.github.com/users/vbehar/orgs", + "repos_url": "https://api.github.com/users/vbehar/repos", + "events_url": "https://api.github.com/users/vbehar/events{/privacy}", + "received_events_url": "https://api.github.com/users/vbehar/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": false, + "push": true, + "pull": true + } + }, + { + "login": "kohsuke", + "id": 50003, + "node_id": "MDQ6VXNlcjUwMDAz", + "avatar_url": "https://avatars1.githubusercontent.com/u/50003?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke", + "html_url": "https://github.com/kohsuke", + "followers_url": "https://api.github.com/users/kohsuke/followers", + "following_url": "https://api.github.com/users/kohsuke/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke/orgs", + "repos_url": "https://api.github.com/users/kohsuke/repos", + "events_url": "https://api.github.com/users/kohsuke/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "gastaldi", + "id": 54133, + "node_id": "MDQ6VXNlcjU0MTMz", + "avatar_url": "https://avatars1.githubusercontent.com/u/54133?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/gastaldi", + "html_url": "https://github.com/gastaldi", + "followers_url": "https://api.github.com/users/gastaldi/followers", + "following_url": "https://api.github.com/users/gastaldi/following{/other_user}", + "gists_url": "https://api.github.com/users/gastaldi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/gastaldi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gastaldi/subscriptions", + "organizations_url": "https://api.github.com/users/gastaldi/orgs", + "repos_url": "https://api.github.com/users/gastaldi/repos", + "events_url": "https://api.github.com/users/gastaldi/events{/privacy}", + "received_events_url": "https://api.github.com/users/gastaldi/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "halkeye", + "id": 110087, + "node_id": "MDQ6VXNlcjExMDA4Nw==", + "avatar_url": "https://avatars3.githubusercontent.com/u/110087?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/halkeye", + "html_url": "https://github.com/halkeye", + "followers_url": "https://api.github.com/users/halkeye/followers", + "following_url": "https://api.github.com/users/halkeye/following{/other_user}", + "gists_url": "https://api.github.com/users/halkeye/gists{/gist_id}", + "starred_url": "https://api.github.com/users/halkeye/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/halkeye/subscriptions", + "organizations_url": "https://api.github.com/users/halkeye/orgs", + "repos_url": "https://api.github.com/users/halkeye/repos", + "events_url": "https://api.github.com/users/halkeye/events{/privacy}", + "received_events_url": "https://api.github.com/users/halkeye/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "mrginglymus", + "id": 390569, + "node_id": "MDQ6VXNlcjM5MDU2OQ==", + "avatar_url": "https://avatars0.githubusercontent.com/u/390569?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mrginglymus", + "html_url": "https://github.com/mrginglymus", + "followers_url": "https://api.github.com/users/mrginglymus/followers", + "following_url": "https://api.github.com/users/mrginglymus/following{/other_user}", + "gists_url": "https://api.github.com/users/mrginglymus/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mrginglymus/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mrginglymus/subscriptions", + "organizations_url": "https://api.github.com/users/mrginglymus/orgs", + "repos_url": "https://api.github.com/users/mrginglymus/repos", + "events_url": "https://api.github.com/users/mrginglymus/events{/privacy}", + "received_events_url": "https://api.github.com/users/mrginglymus/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "cmoulliard", + "id": 463790, + "node_id": "MDQ6VXNlcjQ2Mzc5MA==", + "avatar_url": "https://avatars2.githubusercontent.com/u/463790?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cmoulliard", + "html_url": "https://github.com/cmoulliard", + "followers_url": "https://api.github.com/users/cmoulliard/followers", + "following_url": "https://api.github.com/users/cmoulliard/following{/other_user}", + "gists_url": "https://api.github.com/users/cmoulliard/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cmoulliard/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cmoulliard/subscriptions", + "organizations_url": "https://api.github.com/users/cmoulliard/orgs", + "repos_url": "https://api.github.com/users/cmoulliard/repos", + "events_url": "https://api.github.com/users/cmoulliard/events{/privacy}", + "received_events_url": "https://api.github.com/users/cmoulliard/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "farmdawgnation", + "id": 620189, + "node_id": "MDQ6VXNlcjYyMDE4OQ==", + "avatar_url": "https://avatars2.githubusercontent.com/u/620189?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/farmdawgnation", + "html_url": "https://github.com/farmdawgnation", + "followers_url": "https://api.github.com/users/farmdawgnation/followers", + "following_url": "https://api.github.com/users/farmdawgnation/following{/other_user}", + "gists_url": "https://api.github.com/users/farmdawgnation/gists{/gist_id}", + "starred_url": "https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/farmdawgnation/subscriptions", + "organizations_url": "https://api.github.com/users/farmdawgnation/orgs", + "repos_url": "https://api.github.com/users/farmdawgnation/repos", + "events_url": "https://api.github.com/users/farmdawgnation/events{/privacy}", + "received_events_url": "https://api.github.com/users/farmdawgnation/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "alexanderrtaylor", + "id": 852179, + "node_id": "MDQ6VXNlcjg1MjE3OQ==", + "avatar_url": "https://avatars0.githubusercontent.com/u/852179?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/alexanderrtaylor", + "html_url": "https://github.com/alexanderrtaylor", + "followers_url": "https://api.github.com/users/alexanderrtaylor/followers", + "following_url": "https://api.github.com/users/alexanderrtaylor/following{/other_user}", + "gists_url": "https://api.github.com/users/alexanderrtaylor/gists{/gist_id}", + "starred_url": "https://api.github.com/users/alexanderrtaylor/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/alexanderrtaylor/subscriptions", + "organizations_url": "https://api.github.com/users/alexanderrtaylor/orgs", + "repos_url": "https://api.github.com/users/alexanderrtaylor/repos", + "events_url": "https://api.github.com/users/alexanderrtaylor/events{/privacy}", + "received_events_url": "https://api.github.com/users/alexanderrtaylor/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "PauloMigAlmeida", + "id": 1011868, + "node_id": "MDQ6VXNlcjEwMTE4Njg=", + "avatar_url": "https://avatars1.githubusercontent.com/u/1011868?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/PauloMigAlmeida", + "html_url": "https://github.com/PauloMigAlmeida", + "followers_url": "https://api.github.com/users/PauloMigAlmeida/followers", + "following_url": "https://api.github.com/users/PauloMigAlmeida/following{/other_user}", + "gists_url": "https://api.github.com/users/PauloMigAlmeida/gists{/gist_id}", + "starred_url": "https://api.github.com/users/PauloMigAlmeida/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/PauloMigAlmeida/subscriptions", + "organizations_url": "https://api.github.com/users/PauloMigAlmeida/orgs", + "repos_url": "https://api.github.com/users/PauloMigAlmeida/repos", + "events_url": "https://api.github.com/users/PauloMigAlmeida/events{/privacy}", + "received_events_url": "https://api.github.com/users/PauloMigAlmeida/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "kohsuke2", + "id": 1329242, + "node_id": "MDQ6VXNlcjEzMjkyNDI=", + "avatar_url": "https://avatars2.githubusercontent.com/u/1329242?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kohsuke2", + "html_url": "https://github.com/kohsuke2", + "followers_url": "https://api.github.com/users/kohsuke2/followers", + "following_url": "https://api.github.com/users/kohsuke2/following{/other_user}", + "gists_url": "https://api.github.com/users/kohsuke2/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kohsuke2/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kohsuke2/subscriptions", + "organizations_url": "https://api.github.com/users/kohsuke2/orgs", + "repos_url": "https://api.github.com/users/kohsuke2/repos", + "events_url": "https://api.github.com/users/kohsuke2/events{/privacy}", + "received_events_url": "https://api.github.com/users/kohsuke2/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "jgangemi", + "id": 1831839, + "node_id": "MDQ6VXNlcjE4MzE4Mzk=", + "avatar_url": "https://avatars0.githubusercontent.com/u/1831839?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jgangemi", + "html_url": "https://github.com/jgangemi", + "followers_url": "https://api.github.com/users/jgangemi/followers", + "following_url": "https://api.github.com/users/jgangemi/following{/other_user}", + "gists_url": "https://api.github.com/users/jgangemi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jgangemi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jgangemi/subscriptions", + "organizations_url": "https://api.github.com/users/jgangemi/orgs", + "repos_url": "https://api.github.com/users/jgangemi/repos", + "events_url": "https://api.github.com/users/jgangemi/events{/privacy}", + "received_events_url": "https://api.github.com/users/jgangemi/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjE5NTg5NTM=", + "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/bitwiseman", + "html_url": "https://github.com/bitwiseman", + "followers_url": "https://api.github.com/users/bitwiseman/followers", + "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", + "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", + "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", + "organizations_url": "https://api.github.com/users/bitwiseman/orgs", + "repos_url": "https://api.github.com/users/bitwiseman/repos", + "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", + "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "asthinasthi", + "id": 4577101, + "node_id": "MDQ6VXNlcjQ1NzcxMDE=", + "avatar_url": "https://avatars1.githubusercontent.com/u/4577101?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/asthinasthi", + "html_url": "https://github.com/asthinasthi", + "followers_url": "https://api.github.com/users/asthinasthi/followers", + "following_url": "https://api.github.com/users/asthinasthi/following{/other_user}", + "gists_url": "https://api.github.com/users/asthinasthi/gists{/gist_id}", + "starred_url": "https://api.github.com/users/asthinasthi/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/asthinasthi/subscriptions", + "organizations_url": "https://api.github.com/users/asthinasthi/orgs", + "repos_url": "https://api.github.com/users/asthinasthi/repos", + "events_url": "https://api.github.com/users/asthinasthi/events{/privacy}", + "received_events_url": "https://api.github.com/users/asthinasthi/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "ingwarsw", + "id": 5390156, + "node_id": "MDQ6VXNlcjUzOTAxNTY=", + "avatar_url": "https://avatars2.githubusercontent.com/u/5390156?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ingwarsw", + "html_url": "https://github.com/ingwarsw", + "followers_url": "https://api.github.com/users/ingwarsw/followers", + "following_url": "https://api.github.com/users/ingwarsw/following{/other_user}", + "gists_url": "https://api.github.com/users/ingwarsw/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ingwarsw/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ingwarsw/subscriptions", + "organizations_url": "https://api.github.com/users/ingwarsw/orgs", + "repos_url": "https://api.github.com/users/ingwarsw/repos", + "events_url": "https://api.github.com/users/ingwarsw/events{/privacy}", + "received_events_url": "https://api.github.com/users/ingwarsw/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "Sage-Pierce", + "id": 5396306, + "node_id": "MDQ6VXNlcjUzOTYzMDY=", + "avatar_url": "https://avatars3.githubusercontent.com/u/5396306?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Sage-Pierce", + "html_url": "https://github.com/Sage-Pierce", + "followers_url": "https://api.github.com/users/Sage-Pierce/followers", + "following_url": "https://api.github.com/users/Sage-Pierce/following{/other_user}", + "gists_url": "https://api.github.com/users/Sage-Pierce/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Sage-Pierce/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Sage-Pierce/subscriptions", + "organizations_url": "https://api.github.com/users/Sage-Pierce/orgs", + "repos_url": "https://api.github.com/users/Sage-Pierce/repos", + "events_url": "https://api.github.com/users/Sage-Pierce/events{/privacy}", + "received_events_url": "https://api.github.com/users/Sage-Pierce/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "Irialad", + "id": 6895648, + "node_id": "MDQ6VXNlcjY4OTU2NDg=", + "avatar_url": "https://avatars2.githubusercontent.com/u/6895648?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Irialad", + "html_url": "https://github.com/Irialad", + "followers_url": "https://api.github.com/users/Irialad/followers", + "following_url": "https://api.github.com/users/Irialad/following{/other_user}", + "gists_url": "https://api.github.com/users/Irialad/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Irialad/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Irialad/subscriptions", + "organizations_url": "https://api.github.com/users/Irialad/orgs", + "repos_url": "https://api.github.com/users/Irialad/repos", + "events_url": "https://api.github.com/users/Irialad/events{/privacy}", + "received_events_url": "https://api.github.com/users/Irialad/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "avano", + "id": 7081216, + "node_id": "MDQ6VXNlcjcwODEyMTY=", + "avatar_url": "https://avatars2.githubusercontent.com/u/7081216?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/avano", + "html_url": "https://github.com/avano", + "followers_url": "https://api.github.com/users/avano/followers", + "following_url": "https://api.github.com/users/avano/following{/other_user}", + "gists_url": "https://api.github.com/users/avano/gists{/gist_id}", + "starred_url": "https://api.github.com/users/avano/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/avano/subscriptions", + "organizations_url": "https://api.github.com/users/avano/orgs", + "repos_url": "https://api.github.com/users/avano/repos", + "events_url": "https://api.github.com/users/avano/events{/privacy}", + "received_events_url": "https://api.github.com/users/avano/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "jberglund-BSFT", + "id": 19560713, + "node_id": "MDQ6VXNlcjE5NTYwNzEz", + "avatar_url": "https://avatars3.githubusercontent.com/u/19560713?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/jberglund-BSFT", + "html_url": "https://github.com/jberglund-BSFT", + "followers_url": "https://api.github.com/users/jberglund-BSFT/followers", + "following_url": "https://api.github.com/users/jberglund-BSFT/following{/other_user}", + "gists_url": "https://api.github.com/users/jberglund-BSFT/gists{/gist_id}", + "starred_url": "https://api.github.com/users/jberglund-BSFT/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/jberglund-BSFT/subscriptions", + "organizations_url": "https://api.github.com/users/jberglund-BSFT/orgs", + "repos_url": "https://api.github.com/users/jberglund-BSFT/repos", + "events_url": "https://api.github.com/users/jberglund-BSFT/events{/privacy}", + "received_events_url": "https://api.github.com/users/jberglund-BSFT/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "timja", + "id": 21194782, + "node_id": "MDQ6VXNlcjIxMTk0Nzgy", + "avatar_url": "https://avatars3.githubusercontent.com/u/21194782?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/timja", + "html_url": "https://github.com/timja", + "followers_url": "https://api.github.com/users/timja/followers", + "following_url": "https://api.github.com/users/timja/following{/other_user}", + "gists_url": "https://api.github.com/users/timja/gists{/gist_id}", + "starred_url": "https://api.github.com/users/timja/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/timja/subscriptions", + "organizations_url": "https://api.github.com/users/timja/orgs", + "repos_url": "https://api.github.com/users/timja/repos", + "events_url": "https://api.github.com/users/timja/events{/privacy}", + "received_events_url": "https://api.github.com/users/timja/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "martinvanzijl", + "id": 24422213, + "node_id": "MDQ6VXNlcjI0NDIyMjEz", + "avatar_url": "https://avatars0.githubusercontent.com/u/24422213?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/martinvanzijl", + "html_url": "https://github.com/martinvanzijl", + "followers_url": "https://api.github.com/users/martinvanzijl/followers", + "following_url": "https://api.github.com/users/martinvanzijl/following{/other_user}", + "gists_url": "https://api.github.com/users/martinvanzijl/gists{/gist_id}", + "starred_url": "https://api.github.com/users/martinvanzijl/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/martinvanzijl/subscriptions", + "organizations_url": "https://api.github.com/users/martinvanzijl/orgs", + "repos_url": "https://api.github.com/users/martinvanzijl/repos", + "events_url": "https://api.github.com/users/martinvanzijl/events{/privacy}", + "received_events_url": "https://api.github.com/users/martinvanzijl/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "sladyn98", + "id": 28837406, + "node_id": "MDQ6VXNlcjI4ODM3NDA2", + "avatar_url": "https://avatars1.githubusercontent.com/u/28837406?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sladyn98", + "html_url": "https://github.com/sladyn98", + "followers_url": "https://api.github.com/users/sladyn98/followers", + "following_url": "https://api.github.com/users/sladyn98/following{/other_user}", + "gists_url": "https://api.github.com/users/sladyn98/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sladyn98/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sladyn98/subscriptions", + "organizations_url": "https://api.github.com/users/sladyn98/orgs", + "repos_url": "https://api.github.com/users/sladyn98/repos", + "events_url": "https://api.github.com/users/sladyn98/events{/privacy}", + "received_events_url": "https://api.github.com/users/sladyn98/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "login": "tginiotis-at-work", + "id": 61763026, + "node_id": "MDQ6VXNlcjYxNzYzMDI2", + "avatar_url": "https://avatars3.githubusercontent.com/u/61763026?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/tginiotis-at-work", + "html_url": "https://github.com/tginiotis-at-work", + "followers_url": "https://api.github.com/users/tginiotis-at-work/followers", + "following_url": "https://api.github.com/users/tginiotis-at-work/following{/other_user}", + "gists_url": "https://api.github.com/users/tginiotis-at-work/gists{/gist_id}", + "starred_url": "https://api.github.com/users/tginiotis-at-work/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/tginiotis-at-work/subscriptions", + "organizations_url": "https://api.github.com/users/tginiotis-at-work/orgs", + "repos_url": "https://api.github.com/users/tginiotis-at-work/repos", + "events_url": "https://api.github.com/users/tginiotis-at-work/events{/privacy}", + "received_events_url": "https://api.github.com/users/tginiotis-at-work/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": true, + "push": true, + "pull": true + } + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-5.json new file mode 100644 index 000000000..3575de122 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/repos_hub4j-test-org_github-api_collaborators-5.json @@ -0,0 +1,27 @@ +[ + { + "login": "vbehar", + "id": 6251, + "node_id": "MDQ6VXNlcjYyNTE=", + "avatar_url": "https://avatars0.githubusercontent.com/u/6251?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vbehar", + "html_url": "https://github.com/vbehar", + "followers_url": "https://api.github.com/users/vbehar/followers", + "following_url": "https://api.github.com/users/vbehar/following{/other_user}", + "gists_url": "https://api.github.com/users/vbehar/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vbehar/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vbehar/subscriptions", + "organizations_url": "https://api.github.com/users/vbehar/orgs", + "repos_url": "https://api.github.com/users/vbehar/repos", + "events_url": "https://api.github.com/users/vbehar/events{/privacy}", + "received_events_url": "https://api.github.com/users/vbehar/received_events", + "type": "User", + "site_admin": false, + "permissions": { + "admin": false, + "push": true, + "pull": true + } + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/user-1.json new file mode 100644 index 000000000..4b88d3073 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/__files/user-1.json @@ -0,0 +1,46 @@ +{ + "login": "Irialad", + "id": 6895648, + "node_id": "MDQ6VXNlcjY4OTU2NDg=", + "avatar_url": "https://avatars2.githubusercontent.com/u/6895648?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Irialad", + "html_url": "https://github.com/Irialad", + "followers_url": "https://api.github.com/users/Irialad/followers", + "following_url": "https://api.github.com/users/Irialad/following{/other_user}", + "gists_url": "https://api.github.com/users/Irialad/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Irialad/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Irialad/subscriptions", + "organizations_url": "https://api.github.com/users/Irialad/orgs", + "repos_url": "https://api.github.com/users/Irialad/repos", + "events_url": "https://api.github.com/users/Irialad/events{/privacy}", + "received_events_url": "https://api.github.com/users/Irialad/received_events", + "type": "User", + "site_admin": false, + "name": "Rob Rodrigues", + "company": "@eSentire ", + "blog": "http://www.esentire.com/", + "location": "Seattle, WA", + "email": null, + "hireable": null, + "bio": null, + "twitter_username": null, + "public_repos": 0, + "public_gists": 1, + "followers": 2, + "following": 2, + "created_at": "2014-03-09T02:57:42Z", + "updated_at": "2020-12-02T02:53:13Z", + "private_gists": 1, + "total_private_repos": 0, + "owned_private_repos": 0, + "disk_usage": 0, + "collaborators": 0, + "two_factor_authentication": false, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 000000000..0f7a2746f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,47 @@ +{ + "id": "d4156df6-7f5a-4c20-a59d-f9d789086e9b", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 02 Dec 2020 03:46:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"79833153bb0ac0debd1deb22cfbe53334fefabba336c38166cfc07e0c476f348\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "admin:org, read:user, repo, user:email", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4947", + "X-RateLimit-Reset": "1606881306", + "X-RateLimit-Used": "53", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "692D:55AE:450212:AB6E3C:5FC70DF9" + } + }, + "uuid": "d4156df6-7f5a-4c20-a59d-f9d789086e9b", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api-3.json new file mode 100644 index 000000000..31c699392 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api-3.json @@ -0,0 +1,47 @@ +{ + "id": "ef508b6c-aa06-4636-aa5f-a3e519e0ea00", + "name": "repos_hub4j-test-org_github-api", + "request": { + "url": "/repos/hub4j-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 02 Dec 2020 03:46:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"dfdd7d7bd1fd157959bac2f20957c4c449a084c34c9097e66532f48a8462dbaa\"", + "Last-Modified": "Wed, 10 Jun 2020 23:27:59 GMT", + "X-OAuth-Scopes": "admin:org, read:user, repo, user:email", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4946", + "X-RateLimit-Reset": "1606881306", + "X-RateLimit-Used": "54", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "692D:55AE:450221:AB6F0C:5FC70DFB" + } + }, + "uuid": "ef508b6c-aa06-4636-aa5f-a3e519e0ea00", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-4.json new file mode 100644 index 000000000..10be002ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-4.json @@ -0,0 +1,46 @@ +{ + "id": "9074ea25-c895-45ad-b6bf-a325e13e0d79", + "name": "repos_hub4j-test-org_github-api_collaborators", + "request": { + "url": "/repos/hub4j-test-org/github-api/collaborators", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_collaborators-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 02 Dec 2020 03:46:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"b11c229e8bd3f91a7230e53ffae9c4e7cdc2eed8675a7769b660fd68c41c5fa5\"", + "X-OAuth-Scopes": "admin:org, read:user, repo, user:email", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4945", + "X-RateLimit-Reset": "1606881306", + "X-RateLimit-Used": "55", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "692D:55AE:450230:AB6F3D:5FC70DFB" + } + }, + "uuid": "9074ea25-c895-45ad-b6bf-a325e13e0d79", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-5.json new file mode 100644 index 000000000..9fd345e93 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/repos_hub4j-test-org_github-api_collaborators-5.json @@ -0,0 +1,46 @@ +{ + "id": "3409ce82-079a-4b39-938a-9ee60cea3c8c", + "name": "repos_hub4j-test-org_github-api_collaborators", + "request": { + "url": "/repos/hub4j-test-org/github-api/collaborators?affiliation=outside", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_collaborators-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 02 Dec 2020 03:46:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"85f1ec1dcb19a6b044aa5570cca66d9cb53d189920979be74ccf813973a813f0\"", + "X-OAuth-Scopes": "admin:org, read:user, repo, user:email", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4944", + "X-RateLimit-Reset": "1606881306", + "X-RateLimit-Used": "56", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "692D:55AE:450236:AB6F5C:5FC70DFB" + } + }, + "uuid": "3409ce82-079a-4b39-938a-9ee60cea3c8c", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/user-1.json new file mode 100644 index 000000000..408c76d29 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/listCollaboratorsFiltered/mappings/user-1.json @@ -0,0 +1,47 @@ +{ + "id": "7f9479f4-7ce8-4499-891a-4652633bbf5d", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Wed, 02 Dec 2020 03:46:01 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"3ad5f96a63a0a0246ae3275671e677e1e8f676eba929a82b7ebeb94e72e2a447\"", + "Last-Modified": "Wed, 02 Dec 2020 02:53:13 GMT", + "X-OAuth-Scopes": "admin:org, read:user, repo, user:email", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4949", + "X-RateLimit-Reset": "1606881306", + "X-RateLimit-Used": "51", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "692D:55AE:4501EB:AB6E13:5FC70DF9" + } + }, + "uuid": "7f9479f4-7ce8-4499-891a-4652633bbf5d", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file From ad40d7071e14a3798714c0381e946d691b342995 Mon Sep 17 00:00:00 2001 From: Rob Rodrigues Date: Tue, 1 Dec 2020 20:08:01 -0800 Subject: [PATCH 06/10] Streamline per feedback --- src/main/java/org/kohsuke/github/GHRepository.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index c6a535aac..9b82be41c 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -858,9 +858,7 @@ public class GHRepository extends GHObject { * the io exception */ public PagedIterable listCollaborators(CollaboratorAffiliation affiliation) throws IOException { - Map args = new HashMap<>(); - args.put("affiliation", affiliation.toString().toLowerCase()); - return listUsers("collaborators", args); + return listUsers(root.createRequest().with("affiliation", affiliation), "collaborators"); } /** @@ -925,7 +923,7 @@ public class GHRepository extends GHObject { // no initializer - we just want to the logins PagedIterable users = root.createRequest() .withUrlPath(getApiTailUrl("collaborators")) - .with("affiliation", affiliation.toString().toLowerCase()) + .with("affiliation", affiliation) .toIterable(GHUser[].class, null); for (GHUser u : users.toArray()) { r.add(u.login); @@ -2140,10 +2138,6 @@ public class GHRepository extends GHObject { return listUsers(root.createRequest(), suffix); } - private PagedIterable listUsers(final String suffix, Map args) { - return listUsers(root.createRequest().with(args), suffix); - } - private PagedIterable listUsers(Requester requester, final String suffix) { return requester.withUrlPath(getApiTailUrl(suffix)).toIterable(GHUser[].class, item -> item.wrapUp(root)); } From 30c96221bde9848dad3e53947c496407ace8f5c1 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Fri, 11 Dec 2020 13:54:47 -0800 Subject: [PATCH 07/10] Make wiremock less noisy with slf4j simple logger during tests --- src/test/resources/simplelogger.properties | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/test/resources/simplelogger.properties diff --git a/src/test/resources/simplelogger.properties b/src/test/resources/simplelogger.properties new file mode 100644 index 000000000..8576bfbce --- /dev/null +++ b/src/test/resources/simplelogger.properties @@ -0,0 +1,4 @@ +# quiet down wiremock output +org.slf4j.simpleLogger.log.wiremock.org.eclipse.jetty.server.handler.ContextHandler=warn +org.slf4j.simpleLogger.log.wiremock.org.eclipse.jetty.server.Server=warn +org.slf4j.simpleLogger.log.wiremock.org.eclipse.jetty.server.AbstractConnector=warn From e64d64d8d81ab8ab81dd7ee3716248a0d57f129f Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Fri, 11 Dec 2020 17:11:08 -0800 Subject: [PATCH 08/10] Deprecate OkHttp 2.x connector OkHttp 2.x is unsupported. OkHttpUrlFactory contains bugs and limiations which will not be fixed and also cannot be mitigated by this library. Users should move to OkHttp3. Closes #997 --- src/main/java/org/kohsuke/github/extras/OkHttpConnector.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/kohsuke/github/extras/OkHttpConnector.java b/src/main/java/org/kohsuke/github/extras/OkHttpConnector.java index 9c54c71cb..1ff851f55 100644 --- a/src/main/java/org/kohsuke/github/extras/OkHttpConnector.java +++ b/src/main/java/org/kohsuke/github/extras/OkHttpConnector.java @@ -26,7 +26,11 @@ import javax.net.ssl.SSLSocketFactory; * * @author Roberto Tyley * @author Kohsuke Kawaguchi + * @deprecated This class depends on an unsupported version of OkHttp. Switch to + * {@link org.kohsuke.github.extras.okhttp3.OkHttpConnector}. + * @see org.kohsuke.github.extras.okhttp3.OkHttpConnector */ +@Deprecated public class OkHttpConnector implements HttpConnector { private static final String HEADER_NAME = "Cache-Control"; private final OkUrlFactory urlFactory; From 55e589b3d9e38e6df3f43cbaea218d98ffa514aa Mon Sep 17 00:00:00 2001 From: Tadas Giniotis Date: Sat, 12 Dec 2020 23:41:53 +0200 Subject: [PATCH 09/10] add the "target_url" field for "status" events --- src/main/java/org/kohsuke/github/GHEventPayload.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/kohsuke/github/GHEventPayload.java b/src/main/java/org/kohsuke/github/GHEventPayload.java index 40f0f0fd3..c3a82a14e 100644 --- a/src/main/java/org/kohsuke/github/GHEventPayload.java +++ b/src/main/java/org/kohsuke/github/GHEventPayload.java @@ -1216,6 +1216,7 @@ public class GHEventPayload { private String description; private GHCommitState state; private GHCommit commit; + private String targetUrl; /** * Gets the status content. @@ -1226,6 +1227,15 @@ public class GHEventPayload { return context; } + /** + * The optional link added to the status. + * + * @return a url + */ + public String getTargetUrl() { + return targetUrl; + } + /** * Gets the status description. * From 3b58fbc186cb4ffcaaf733564e117597e860018e Mon Sep 17 00:00:00 2001 From: Tadas Giniotis Date: Sat, 12 Dec 2020 23:42:08 +0200 Subject: [PATCH 10/10] test "target_url" --- .../kohsuke/github/GHEventPayloadTest.java | 8 + .../github/GHEventPayloadTest/status2.json | 204 ++++++++++++++++++ 2 files changed, 212 insertions(+) create mode 100644 src/test/resources/org/kohsuke/github/GHEventPayloadTest/status2.json diff --git a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java index 49434cf4f..d6fdd9c5e 100644 --- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java +++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java @@ -471,6 +471,14 @@ public class GHEventPayloadTest extends AbstractGitHubWireMockTest { assertThat(event.getState(), is(GHCommitState.SUCCESS)); assertThat(event.getCommit().getSHA1(), is("9049f1265b7d61be4a8904a9a27120d2064dab3b")); assertThat(event.getRepository().getOwner().getLogin(), is("baxterthehacker")); + assertNull(event.getTargetUrl()); + } + + @Test + public void status2() throws Exception { + GHEventPayload.Status event = GitHub.offline() + .parseEventPayload(payload.asReader(), GHEventPayload.Status.class); + assertThat(event.getTargetUrl(), is("https://www.wikipedia.org/")); } // TODO implement support classes and write test diff --git a/src/test/resources/org/kohsuke/github/GHEventPayloadTest/status2.json b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/status2.json new file mode 100644 index 000000000..bb02e0fc2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/status2.json @@ -0,0 +1,204 @@ +{ + "id": 214015194, + "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b", + "name": "baxterthehacker/public-repo", + "target_url": "https://www.wikipedia.org/", + "context": "default", + "description": "status description", + "state": "success", + "commit": { + "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b", + "commit": { + "author": { + "name": "baxterthehacker", + "email": "baxterthehacker@users.noreply.github.com", + "date": "2015-05-05T23:40:12Z" + }, + "committer": { + "name": "baxterthehacker", + "email": "baxterthehacker@users.noreply.github.com", + "date": "2015-05-05T23:40:12Z" + }, + "message": "Initial commit", + "tree": { + "sha": "02b49ad0ba4f1acd9f06531b21e16a4ac5d341d0", + "url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees/02b49ad0ba4f1acd9f06531b21e16a4ac5d341d0" + }, + "url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b", + "comment_count": 1 + }, + "url": "https://api.github.com/repos/baxterthehacker/public-repo/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b", + "html_url": "https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b", + "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b/comments", + "author": { + "login": "baxterthehacker", + "id": 6752317, + "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/baxterthehacker", + "html_url": "https://github.com/baxterthehacker", + "followers_url": "https://api.github.com/users/baxterthehacker/followers", + "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", + "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", + "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", + "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", + "repos_url": "https://api.github.com/users/baxterthehacker/repos", + "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", + "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "baxterthehacker", + "id": 6752317, + "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/baxterthehacker", + "html_url": "https://github.com/baxterthehacker", + "followers_url": "https://api.github.com/users/baxterthehacker/followers", + "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", + "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", + "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", + "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", + "repos_url": "https://api.github.com/users/baxterthehacker/repos", + "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", + "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", + "type": "User", + "site_admin": false + }, + "parents": [] + }, + "branches": [ + { + "name": "master", + "commit": { + "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b", + "url": "https://api.github.com/repos/baxterthehacker/public-repo/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b" + } + }, + { + "name": "changes", + "commit": { + "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", + "url": "https://api.github.com/repos/baxterthehacker/public-repo/commits/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c" + } + }, + { + "name": "gh-pages", + "commit": { + "sha": "b11bb7545ac14abafc6191a0481b0d961e7793c6", + "url": "https://api.github.com/repos/baxterthehacker/public-repo/commits/b11bb7545ac14abafc6191a0481b0d961e7793c6" + } + } + ], + "created_at": "2015-05-05T23:40:39Z", + "updated_at": "2015-05-05T23:40:39Z", + "repository": { + "id": 35129377, + "name": "public-repo", + "full_name": "baxterthehacker/public-repo", + "owner": { + "login": "baxterthehacker", + "id": 6752317, + "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/baxterthehacker", + "html_url": "https://github.com/baxterthehacker", + "followers_url": "https://api.github.com/users/baxterthehacker/followers", + "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", + "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", + "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", + "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", + "repos_url": "https://api.github.com/users/baxterthehacker/repos", + "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", + "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/baxterthehacker/public-repo", + "description": "", + "fork": false, + "url": "https://api.github.com/repos/baxterthehacker/public-repo", + "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", + "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", + "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", + "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", + "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", + "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", + "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", + "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", + "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", + "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", + "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", + "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", + "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", + "created_at": "2015-05-05T23:40:12Z", + "updated_at": "2015-05-05T23:40:30Z", + "pushed_at": "2015-05-05T23:40:39Z", + "git_url": "git://github.com/baxterthehacker/public-repo.git", + "ssh_url": "git@github.com:baxterthehacker/public-repo.git", + "clone_url": "https://github.com/baxterthehacker/public-repo.git", + "svn_url": "https://github.com/baxterthehacker/public-repo", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 0, + "mirror_url": null, + "open_issues_count": 2, + "forks": 0, + "open_issues": 2, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "baxterthehacker", + "id": 6752317, + "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/baxterthehacker", + "html_url": "https://github.com/baxterthehacker", + "followers_url": "https://api.github.com/users/baxterthehacker/followers", + "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", + "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", + "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", + "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", + "repos_url": "https://api.github.com/users/baxterthehacker/repos", + "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", + "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", + "type": "User", + "site_admin": false + } +}