Repository: hub4j/github-api
Pull request #1561 (2022-11-08 19:38:55)

Add outside_collaborators list
# Description

This PR adds the ability to list outside members of the organization.
As indicated in the github documentation (https://docs.github.com/en/rest/orgs/outside-collaborators)

# Before submitting a PR:

- [X] Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, [CONTRIBUTING.md](CONTRIBUTING.md) for details.
- [X] Add JavaDocs and other comments as appropriate. Consider including links in comments to relevant documentation on https://docs.github.com/en/rest .  
- [x] Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
- [ ] Run `mvn -D enable-ci clean install site` locally. If this command doesn't succeed, your change will not pass CI.
- [X] Push your changes to a branch other than `main`. You will create your PR from that branch.

# When creating a PR: 

- [X] Fill in the "Description" above with clear summary of the changes. This includes:
  - [ ] If this PR fixes one or more issues, include "Fixes #<issue number>" lines for each issue. 
  - [X] Provide links to relevant documentation on https://docs.github.com/en/rest where possible.
- [x] All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
- [X] Enable "Allow edits from maintainers".



Patch:
diff --git a/src/main/java/org/kohsuke/github/GHOrganization.java b/src/main/java/org/kohsuke/github/GHOrganization.java
index 9b0b901d3..5b45e6314 100644
--- a/src/main/java/org/kohsuke/github/GHOrganization.java
+++ b/src/main/java/org/kohsuke/github/GHOrganization.java
@@ -315,6 +315,17 @@ public class GHOrganization extends GHPerson {
         return listMembers("public_members");
     }
 
+    /**
+     * All the outside collaborators of this organization.
+     *
+     * @return the paged iterable
+     * @throws IOException
+     *             the io exception
+     */
+    public PagedIterable<GHUser> listOutsideCollaborators() throws IOException {
+        return listMembers("outside_collaborators");
+    }
+
     private PagedIterable<GHUser> listMembers(String suffix) throws IOException {
         return listMembers(suffix, null, null);
     }
@@ -332,6 +343,19 @@ public class GHOrganization extends GHPerson {
         return listMembers("members", filter, null);
     }
 
+    /**
+     * List outside collaborators with filter paged iterable.
+     *
+     * @param filter
+     *            the filter
+     * @return the paged iterable
+     * @throws IOException
+     *             the io exception
+     */
+    public PagedIterable<GHUser> listOutsideCollaboratorsWithFilter(String filter) throws IOException {
+        return listMembers("outside_collaborators", filter, null);
+    }
+
     /**
      * List members with specified role paged iterable.
      *


Test patch:
diff --git a/src/test/java/org/kohsuke/github/GHOrganizationTest.java b/src/test/java/org/kohsuke/github/GHOrganizationTest.java
index 9ec59b301..6edd1e172 100644
--- a/src/test/java/org/kohsuke/github/GHOrganizationTest.java
+++ b/src/test/java/org/kohsuke/github/GHOrganizationTest.java
@@ -241,6 +241,65 @@ public class GHOrganizationTest extends AbstractGitHubWireMockTest {
                         "timja"));
     }
 
+    /**
+     * Test list outside collaborators.
+     *
+     * @throws IOException
+     *             Signals that an I/O exception has occurred.
+     */
+    @Test
+    public void testListOutsideCollaborators() throws IOException {
+        GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
+
+        List<GHUser> admins = org.listOutsideCollaborators().toList();
+
+        assertThat(admins, notNullValue());
+        // In case more are added in the future
+        assertThat(admins.size(), greaterThanOrEqualTo(12));
+        assertThat(admins.stream().map(GHUser::getLogin).collect(Collectors.toList()),
+                hasItems("alexanderrtaylor",
+                        "asthinasthi",
+                        "bitwiseman",
+                        "farmdawgnation",
+                        "halkeye",
+                        "jberglund-BSFT",
+                        "kohsuke",
+                        "kohsuke2",
+                        "martinvanzijl",
+                        "PauloMigAlmeida",
+                        "Sage-Pierce",
+                        "timja"));
+    }
+    /**
+     * Test list outside collaborators with filter.
+     *
+     * @throws IOException
+     *             Signals that an I/O exception has occurred.
+     */
+    @Test
+    public void testListOutsideCollaboratorsWithFilter() throws IOException {
+        GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
+
+        List<GHUser> admins = org.listOutsideCollaboratorsWithFilter("all").toList();
+
+        assertThat(admins, notNullValue());
+        // In case more are added in the future
+        assertThat(admins.size(), greaterThanOrEqualTo(12));
+        assertThat(admins.stream().map(GHUser::getLogin).collect(Collectors.toList()),
+                hasItems("alexanderrtaylor",
+                        "asthinasthi",
+                        "bitwiseman",
+                        "farmdawgnation",
+                        "halkeye",
+                        "jberglund-BSFT",
+                        "kohsuke",
+                        "kohsuke2",
+                        "martinvanzijl",
+                        "PauloMigAlmeida",
+                        "Sage-Pierce",
+                        "timja"));
+    }
+
     /**
      * Test create team with repo access.
      *
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/orgs_hub4j-test-org-2.json
new file mode 100644
index 000000000..731f70709
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/orgs_hub4j-test-org-2.json
@@ -0,0 +1,41 @@
+{
+  "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": null,
+  "is_verified": false,
+  "has_organization_projects": true,
+  "has_repository_projects": true,
+  "public_repos": 11,
+  "public_gists": 0,
+  "followers": 0,
+  "following": 0,
+  "html_url": "https://github.com/hub4j-test-org",
+  "created_at": "2014-05-10T19:39:11Z",
+  "updated_at": "2015-04-20T00:42:30Z",
+  "type": "Organization",
+  "total_private_repos": 0,
+  "owned_private_repos": 0,
+  "private_gists": 0,
+  "disk_usage": 147,
+  "collaborators": 0,
+  "billing_email": "kk@kohsuke.org",
+  "default_repository_permission": "none",
+  "members_can_create_repositories": false,
+  "two_factor_requirement_enabled": false,
+  "plan": {
+    "name": "free",
+    "space": 976562499,
+    "private_repos": 0,
+    "filled_seats": 12,
+    "seats": 0
+  }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/orgs_hub4j-test-org_members-3.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/orgs_hub4j-test-org_members-3.json
new file mode 100644
index 000000000..c8fc2f66f
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/orgs_hub4j-test-org_members-3.json
@@ -0,0 +1,242 @@
+[
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  }
+]
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/user-1.json
new file mode 100644
index 000000000..750413948
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/__files/user-1.json
@@ -0,0 +1,45 @@
+{
+  "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,
+  "name": "Sage Pierce",
+  "company": "@Vrbo @ExpediaGroup",
+  "blog": "",
+  "location": null,
+  "email": "sapierce@vrbo.com",
+  "hireable": true,
+  "bio": "Software engineer with a Masters of Science in Electrical and Computer Engineering out of The University of Texas at Austin.",
+  "public_repos": 9,
+  "public_gists": 0,
+  "followers": 4,
+  "following": 0,
+  "created_at": "2013-09-06T02:22:48Z",
+  "updated_at": "2020-02-18T13:29:56Z",
+  "private_gists": 0,
+  "total_private_repos": 0,
+  "owned_private_repos": 0,
+  "disk_usage": 1816,
+  "collaborators": 0,
+  "two_factor_authentication": true,
+  "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/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/orgs_hub4j-test-org-2.json
new file mode 100644
index 000000000..a28834ada
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/orgs_hub4j-test-org-2.json
@@ -0,0 +1,48 @@
+{
+  "id": "3ed48345-73c2-4d8e-9c65-f4a140356d59",
+  "name": "orgs_hub4j-test-org",
+  "request": {
+    "url": "/orgs/hub4j-test-org",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "orgs_hub4j-test-org-2.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Tue, 25 Feb 2020 14:41:05 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Status": "200 OK",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4984",
+      "X-RateLimit-Reset": "1582644474",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"712644daa44df3089a27d6ef60979929\"",
+      "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT",
+      "X-OAuth-Scopes": "delete_repo, repo, user",
+      "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+      "X-GitHub-Media-Type": "unknown, github.v3",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+      "Access-Control-Allow-Origin": "*",
+      "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": "EB37:2979:3EAF7E:786110:5E5531FF"
+    }
+  },
+  "uuid": "3ed48345-73c2-4d8e-9c65-f4a140356d59",
+  "persistent": true,
+  "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/orgs_hub4j-test-org_members-3.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/orgs_hub4j-test-org_members-3.json
new file mode 100644
index 000000000..b34c01a2d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/orgs_hub4j-test-org_members-3.json
@@ -0,0 +1,47 @@
+{
+  "id": "ef9f50f7-160c-4410-a82e-68d3e14fb250",
+  "name": "orgs_hub4j-test-org_members",
+  "request": {
+    "url": "/orgs/hub4j-test-org/outside_collaborators",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "orgs_hub4j-test-org_members-3.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Tue, 25 Feb 2020 14:41:06 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Status": "200 OK",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4983",
+      "X-RateLimit-Reset": "1582644475",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"631de12e6bc586863218257765331a70\"",
+      "X-OAuth-Scopes": "delete_repo, repo, user",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "unknown, github.v3",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+      "Access-Control-Allow-Origin": "*",
+      "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": "EB37:2979:3EAF8C:78624D:5E553201"
+    }
+  },
+  "uuid": "ef9f50f7-160c-4410-a82e-68d3e14fb250",
+  "persistent": true,
+  "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/user-1.json
new file mode 100644
index 000000000..c259d1b9d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaborators/mappings/user-1.json
@@ -0,0 +1,48 @@
+{
+  "id": "9e0ec7a6-d16f-4198-b2e6-ed290e9d780d",
+  "name": "user",
+  "request": {
+    "url": "/user",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "user-1.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Tue, 25 Feb 2020 14:41:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Status": "200 OK",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4988",
+      "X-RateLimit-Reset": "1582644474",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"9adfa44fe91fb698b5fd807d9471afc3\"",
+      "Last-Modified": "Tue, 18 Feb 2020 13:29:56 GMT",
+      "X-OAuth-Scopes": "delete_repo, repo, user",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "unknown, github.v3",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+      "Access-Control-Allow-Origin": "*",
+      "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": "EB37:2979:3EAEEA:7860F9:5E5531FF"
+    }
+  },
+  "uuid": "9e0ec7a6-d16f-4198-b2e6-ed290e9d780d",
+  "persistent": true,
+  "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/orgs_hub4j-test-org-2.json
new file mode 100644
index 000000000..731f70709
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/orgs_hub4j-test-org-2.json
@@ -0,0 +1,41 @@
+{
+  "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": null,
+  "is_verified": false,
+  "has_organization_projects": true,
+  "has_repository_projects": true,
+  "public_repos": 11,
+  "public_gists": 0,
+  "followers": 0,
+  "following": 0,
+  "html_url": "https://github.com/hub4j-test-org",
+  "created_at": "2014-05-10T19:39:11Z",
+  "updated_at": "2015-04-20T00:42:30Z",
+  "type": "Organization",
+  "total_private_repos": 0,
+  "owned_private_repos": 0,
+  "private_gists": 0,
+  "disk_usage": 147,
+  "collaborators": 0,
+  "billing_email": "kk@kohsuke.org",
+  "default_repository_permission": "none",
+  "members_can_create_repositories": false,
+  "two_factor_requirement_enabled": false,
+  "plan": {
+    "name": "free",
+    "space": 976562499,
+    "private_repos": 0,
+    "filled_seats": 12,
+    "seats": 0
+  }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/orgs_hub4j-test-org_members-3.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/orgs_hub4j-test-org_members-3.json
new file mode 100644
index 000000000..c8fc2f66f
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/orgs_hub4j-test-org_members-3.json
@@ -0,0 +1,242 @@
+[
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  },
+  {
+    "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
+  }
+]
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/user-1.json
new file mode 100644
index 000000000..750413948
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/__files/user-1.json
@@ -0,0 +1,45 @@
+{
+  "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,
+  "name": "Sage Pierce",
+  "company": "@Vrbo @ExpediaGroup",
+  "blog": "",
+  "location": null,
+  "email": "sapierce@vrbo.com",
+  "hireable": true,
+  "bio": "Software engineer with a Masters of Science in Electrical and Computer Engineering out of The University of Texas at Austin.",
+  "public_repos": 9,
+  "public_gists": 0,
+  "followers": 4,
+  "following": 0,
+  "created_at": "2013-09-06T02:22:48Z",
+  "updated_at": "2020-02-18T13:29:56Z",
+  "private_gists": 0,
+  "total_private_repos": 0,
+  "owned_private_repos": 0,
+  "disk_usage": 1816,
+  "collaborators": 0,
+  "two_factor_authentication": true,
+  "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/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/orgs_hub4j-test-org-2.json
new file mode 100644
index 000000000..a28834ada
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/orgs_hub4j-test-org-2.json
@@ -0,0 +1,48 @@
+{
+  "id": "3ed48345-73c2-4d8e-9c65-f4a140356d59",
+  "name": "orgs_hub4j-test-org",
+  "request": {
+    "url": "/orgs/hub4j-test-org",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "orgs_hub4j-test-org-2.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Tue, 25 Feb 2020 14:41:05 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Status": "200 OK",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4984",
+      "X-RateLimit-Reset": "1582644474",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"712644daa44df3089a27d6ef60979929\"",
+      "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT",
+      "X-OAuth-Scopes": "delete_repo, repo, user",
+      "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+      "X-GitHub-Media-Type": "unknown, github.v3",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+      "Access-Control-Allow-Origin": "*",
+      "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": "EB37:2979:3EAF7E:786110:5E5531FF"
+    }
+  },
+  "uuid": "3ed48345-73c2-4d8e-9c65-f4a140356d59",
+  "persistent": true,
+  "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/orgs_hub4j-test-org_members-3.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/orgs_hub4j-test-org_members-3.json
new file mode 100644
index 000000000..b3b40db81
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/orgs_hub4j-test-org_members-3.json
@@ -0,0 +1,47 @@
+{
+  "id": "ef9f50f7-160c-4410-a82e-68d3e14fb250",
+  "name": "orgs_hub4j-test-org_members",
+  "request": {
+    "url": "/orgs/hub4j-test-org/outside_collaborators?filter=all",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "orgs_hub4j-test-org_members-3.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Tue, 25 Feb 2020 14:41:06 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Status": "200 OK",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4983",
+      "X-RateLimit-Reset": "1582644475",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"631de12e6bc586863218257765331a70\"",
+      "X-OAuth-Scopes": "delete_repo, repo, user",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "unknown, github.v3",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+      "Access-Control-Allow-Origin": "*",
+      "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": "EB37:2979:3EAF8C:78624D:5E553201"
+    }
+  },
+  "uuid": "ef9f50f7-160c-4410-a82e-68d3e14fb250",
+  "persistent": true,
+  "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/user-1.json
new file mode 100644
index 000000000..c259d1b9d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testListOutsideCollaboratorsWithFilter/mappings/user-1.json
@@ -0,0 +1,48 @@
+{
+  "id": "9e0ec7a6-d16f-4198-b2e6-ed290e9d780d",
+  "name": "user",
+  "request": {
+    "url": "/user",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "user-1.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Tue, 25 Feb 2020 14:41:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Status": "200 OK",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4988",
+      "X-RateLimit-Reset": "1582644474",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"9adfa44fe91fb698b5fd807d9471afc3\"",
+      "Last-Modified": "Tue, 18 Feb 2020 13:29:56 GMT",
+      "X-OAuth-Scopes": "delete_repo, repo, user",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "unknown, github.v3",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
+      "Access-Control-Allow-Origin": "*",
+      "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": "EB37:2979:3EAEEA:7860F9:5E5531FF"
+    }
+  },
+  "uuid": "9e0ec7a6-d16f-4198-b2e6-ed290e9d780d",
+  "persistent": true,
+  "insertionIndex": 1
+}
\ No newline at end of file