Repository: hub4j/github-api
Pull request #1433 (2022-04-18 19:44:52)

Add GHRepository#hasPermission()
@bitwiseman this is a proposal to add a `GHRepository#hasPermission(user, permission)` method.

The rationale of it is that most often than not you want to check that someone has **at least** a given level and not a specific permission.
The current API makes it a bit cumbersome to do it.

The added test explains it all.


codecov[bot]: # [Codecov](https://codecov.io/gh/hub4j/github-api/pull/1433?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j) Report
> Merging [#1433](https://codecov.io/gh/hub4j/github-api/pull/1433?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j) (6b52de7) into [main](https://codecov.io/gh/hub4j/github-api/commit/2cab12403aa2dc23118a47307548ecde24d9266f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j) (2cab124) will **increase** coverage by `0.01%`.
> The diff coverage is `88.88%`.

```diff
@@             Coverage Diff              @@
##               main    #1433      +/-   ##
============================================
+ Coverage     78.62%   78.63%   +0.01%     
- Complexity     2090     2096       +6     
============================================
  Files           201      201              
  Lines          6381     6389       +8     
  Branches        357      359       +2     
============================================
+ Hits           5017     5024       +7     
- Misses         1157     1158       +1     
  Partials        207      207              
```


| [Impacted Files](https://codecov.io/gh/hub4j/github-api/pull/1433?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j) | Coverage Δ | |
|---|---|---|
| [src/main/java/org/kohsuke/github/GHRepository.java](https://codecov.io/gh/hub4j/github-api/pull/1433/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j#diff-c3JjL21haW4vamF2YS9vcmcva29oc3VrZS9naXRodWIvR0hSZXBvc2l0b3J5LmphdmE=) | `68.18% <50.00%> (-0.06%)` | :arrow_down: |
| [...main/java/org/kohsuke/github/GHPermissionType.java](https://codecov.io/gh/hub4j/github-api/pull/1433/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j#diff-c3JjL21haW4vamF2YS9vcmcva29oc3VrZS9naXRodWIvR0hQZXJtaXNzaW9uVHlwZS5qYXZh) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/hub4j/github-api/pull/1433?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/hub4j/github-api/pull/1433?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j). Last update [2cab124...6b52de7](https://codecov.io/gh/hub4j/github-api/pull/1433?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hub4j).


Patch:
diff --git a/src/main/java/org/kohsuke/github/GHPermissionType.java b/src/main/java/org/kohsuke/github/GHPermissionType.java
index 26892f3f7..7b0952817 100644
--- a/src/main/java/org/kohsuke/github/GHPermissionType.java
+++ b/src/main/java/org/kohsuke/github/GHPermissionType.java
@@ -6,5 +6,20 @@ package org.kohsuke.github;
  * @author Kohsuke Kawaguchi
  */
 public enum GHPermissionType {
-    ADMIN, WRITE, READ, NONE
+    ADMIN(30), WRITE(20), READ(10), NONE(0);
+
+    private final int level;
+
+    GHPermissionType(int level) {
+        this.level = level;
+    }
+
+    boolean implies(GHPermissionType other) {
+        // NONE is a special case
+        if (other == NONE) {
+            return this == NONE;
+        }
+
+        return this.level >= other.level;
+    }
 }
diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java
index fd38253a0..32573ba9b 100644
--- a/src/main/java/org/kohsuke/github/GHRepository.java
+++ b/src/main/java/org/kohsuke/github/GHRepository.java
@@ -1042,6 +1042,36 @@ public class GHRepository extends GHObject {
         return getPermission(u.getLogin());
     }
 
+    /**
+     * Check if a user has at least the given permission in this repository.
+     *
+     * @param user
+     *            a {@link GHUser#getLogin}
+     * @param permission
+     *            the permission to check
+     * @return true if the user has at least this permission level
+     * @throws IOException
+     *             the io exception
+     */
+    public boolean hasPermission(String user, GHPermissionType permission) throws IOException {
+        return getPermission(user).implies(permission);
+    }
+
+    /**
+     * Check if a user has at least the given permission in this repository.
+     *
+     * @param user
+     *            the user
+     * @param permission
+     *            the permission to check
+     * @return true if the user has at least this permission level
+     * @throws IOException
+     *             the io exception
+     */
+    public boolean hasPermission(GHUser user, GHPermissionType permission) throws IOException {
+        return hasPermission(user.getLogin(), permission);
+    }
+
     /**
      * If this repository belongs to an organization, return a set of teams.
      *


Test patch:
diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java
index a1e3833be..2a1d69b71 100644
--- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java
+++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java
@@ -325,6 +325,35 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest {
         }
     }
 
+    @Test
+    public void hasPermission() throws Exception {
+        kohsuke();
+        GHRepository publicRepository = gitHub.getRepository("hub4j-test-org/test-permission");
+        assertThat(publicRepository.hasPermission("kohsuke", GHPermissionType.ADMIN), equalTo(true));
+        assertThat(publicRepository.hasPermission("kohsuke", GHPermissionType.WRITE), equalTo(true));
+        assertThat(publicRepository.hasPermission("kohsuke", GHPermissionType.READ), equalTo(true));
+        assertThat(publicRepository.hasPermission("kohsuke", GHPermissionType.NONE), equalTo(false));
+
+        assertThat(publicRepository.hasPermission("dude", GHPermissionType.ADMIN), equalTo(false));
+        assertThat(publicRepository.hasPermission("dude", GHPermissionType.WRITE), equalTo(false));
+        assertThat(publicRepository.hasPermission("dude", GHPermissionType.READ), equalTo(true));
+        assertThat(publicRepository.hasPermission("dude", GHPermissionType.NONE), equalTo(false));
+
+        // also check the GHUser method
+        GHUser kohsuke = gitHub.getUser("kohsuke");
+        assertThat(publicRepository.hasPermission(kohsuke, GHPermissionType.ADMIN), equalTo(true));
+        assertThat(publicRepository.hasPermission(kohsuke, GHPermissionType.WRITE), equalTo(true));
+        assertThat(publicRepository.hasPermission(kohsuke, GHPermissionType.READ), equalTo(true));
+        assertThat(publicRepository.hasPermission(kohsuke, GHPermissionType.NONE), equalTo(false));
+
+        // check NONE on a private project
+        GHRepository privateRepository = gitHub.getRepository("hub4j-test-org/test-permission-private");
+        assertThat(privateRepository.hasPermission("dude", GHPermissionType.ADMIN), equalTo(false));
+        assertThat(privateRepository.hasPermission("dude", GHPermissionType.WRITE), equalTo(false));
+        assertThat(privateRepository.hasPermission("dude", GHPermissionType.READ), equalTo(false));
+        assertThat(privateRepository.hasPermission("dude", GHPermissionType.NONE), equalTo(true));
+    }
+
     @Test
     public void LatestRepositoryExist() {
         try {
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-1.json
new file mode 100644
index 000000000..fa81a060d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-1.json
@@ -0,0 +1,134 @@
+{
+  "id": 78481711,
+  "node_id": "MDEwOlJlcG9zaXRvcnk3ODQ4MTcxMQ==",
+  "name": "test-permission",
+  "full_name": "hub4j-test-org/test-permission",
+  "private": false,
+  "owner": {
+    "login": "hub4j-test-org",
+    "id": 7544739,
+    "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+    "avatar_url": "https://avatars.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/test-permission",
+  "description": "RepositoryTest#getPermission() test fixture",
+  "fork": false,
+  "url": "https://api.github.com/repos/hub4j-test-org/test-permission",
+  "forks_url": "https://api.github.com/repos/hub4j-test-org/test-permission/forks",
+  "keys_url": "https://api.github.com/repos/hub4j-test-org/test-permission/keys{/key_id}",
+  "collaborators_url": "https://api.github.com/repos/hub4j-test-org/test-permission/collaborators{/collaborator}",
+  "teams_url": "https://api.github.com/repos/hub4j-test-org/test-permission/teams",
+  "hooks_url": "https://api.github.com/repos/hub4j-test-org/test-permission/hooks",
+  "issue_events_url": "https://api.github.com/repos/hub4j-test-org/test-permission/issues/events{/number}",
+  "events_url": "https://api.github.com/repos/hub4j-test-org/test-permission/events",
+  "assignees_url": "https://api.github.com/repos/hub4j-test-org/test-permission/assignees{/user}",
+  "branches_url": "https://api.github.com/repos/hub4j-test-org/test-permission/branches{/branch}",
+  "tags_url": "https://api.github.com/repos/hub4j-test-org/test-permission/tags",
+  "blobs_url": "https://api.github.com/repos/hub4j-test-org/test-permission/git/blobs{/sha}",
+  "git_tags_url": "https://api.github.com/repos/hub4j-test-org/test-permission/git/tags{/sha}",
+  "git_refs_url": "https://api.github.com/repos/hub4j-test-org/test-permission/git/refs{/sha}",
+  "trees_url": "https://api.github.com/repos/hub4j-test-org/test-permission/git/trees{/sha}",
+  "statuses_url": "https://api.github.com/repos/hub4j-test-org/test-permission/statuses/{sha}",
+  "languages_url": "https://api.github.com/repos/hub4j-test-org/test-permission/languages",
+  "stargazers_url": "https://api.github.com/repos/hub4j-test-org/test-permission/stargazers",
+  "contributors_url": "https://api.github.com/repos/hub4j-test-org/test-permission/contributors",
+  "subscribers_url": "https://api.github.com/repos/hub4j-test-org/test-permission/subscribers",
+  "subscription_url": "https://api.github.com/repos/hub4j-test-org/test-permission/subscription",
+  "commits_url": "https://api.github.com/repos/hub4j-test-org/test-permission/commits{/sha}",
+  "git_commits_url": "https://api.github.com/repos/hub4j-test-org/test-permission/git/commits{/sha}",
+  "comments_url": "https://api.github.com/repos/hub4j-test-org/test-permission/comments{/number}",
+  "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/test-permission/issues/comments{/number}",
+  "contents_url": "https://api.github.com/repos/hub4j-test-org/test-permission/contents/{+path}",
+  "compare_url": "https://api.github.com/repos/hub4j-test-org/test-permission/compare/{base}...{head}",
+  "merges_url": "https://api.github.com/repos/hub4j-test-org/test-permission/merges",
+  "archive_url": "https://api.github.com/repos/hub4j-test-org/test-permission/{archive_format}{/ref}",
+  "downloads_url": "https://api.github.com/repos/hub4j-test-org/test-permission/downloads",
+  "issues_url": "https://api.github.com/repos/hub4j-test-org/test-permission/issues{/number}",
+  "pulls_url": "https://api.github.com/repos/hub4j-test-org/test-permission/pulls{/number}",
+  "milestones_url": "https://api.github.com/repos/hub4j-test-org/test-permission/milestones{/number}",
+  "notifications_url": "https://api.github.com/repos/hub4j-test-org/test-permission/notifications{?since,all,participating}",
+  "labels_url": "https://api.github.com/repos/hub4j-test-org/test-permission/labels{/name}",
+  "releases_url": "https://api.github.com/repos/hub4j-test-org/test-permission/releases{/id}",
+  "deployments_url": "https://api.github.com/repos/hub4j-test-org/test-permission/deployments",
+  "created_at": "2017-01-10T00:22:47Z",
+  "updated_at": "2017-01-10T00:22:47Z",
+  "pushed_at": "2017-01-10T00:22:48Z",
+  "git_url": "git://github.com/hub4j-test-org/test-permission.git",
+  "ssh_url": "git@github.com:hub4j-test-org/test-permission.git",
+  "clone_url": "https://github.com/hub4j-test-org/test-permission.git",
+  "svn_url": "https://github.com/hub4j-test-org/test-permission",
+  "homepage": null,
+  "size": 0,
+  "stargazers_count": 0,
+  "watchers_count": 0,
+  "language": null,
+  "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": 0,
+  "license": null,
+  "allow_forking": true,
+  "is_template": false,
+  "topics": [],
+  "visibility": "public",
+  "forks": 0,
+  "open_issues": 0,
+  "watchers": 0,
+  "default_branch": "master",
+  "permissions": {
+    "admin": true,
+    "maintain": true,
+    "push": true,
+    "triage": true,
+    "pull": true
+  },
+  "temp_clone_token": "",
+  "allow_squash_merge": true,
+  "allow_merge_commit": true,
+  "allow_rebase_merge": true,
+  "allow_auto_merge": false,
+  "delete_branch_on_merge": false,
+  "allow_update_branch": false,
+  "organization": {
+    "login": "hub4j-test-org",
+    "id": 7544739,
+    "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+    "avatar_url": "https://avatars.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
+  },
+  "network_count": 0,
+  "subscribers_count": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private-15.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private-15.json
new file mode 100644
index 000000000..90cf50bce
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private-15.json
@@ -0,0 +1,134 @@
+{
+  "id": 482967898,
+  "node_id": "R_kgDOHMmBWg",
+  "name": "test-permission-private",
+  "full_name": "hub4j-test-org/test-permission-private",
+  "private": true,
+  "owner": {
+    "login": "hub4j-test-org",
+    "id": 7544739,
+    "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+    "avatar_url": "https://avatars.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/test-permission-private",
+  "description": "Private project for permission tests",
+  "fork": false,
+  "url": "https://api.github.com/repos/hub4j-test-org/test-permission-private",
+  "forks_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/forks",
+  "keys_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/keys{/key_id}",
+  "collaborators_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/collaborators{/collaborator}",
+  "teams_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/teams",
+  "hooks_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/hooks",
+  "issue_events_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/issues/events{/number}",
+  "events_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/events",
+  "assignees_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/assignees{/user}",
+  "branches_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/branches{/branch}",
+  "tags_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/tags",
+  "blobs_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/git/blobs{/sha}",
+  "git_tags_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/git/tags{/sha}",
+  "git_refs_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/git/refs{/sha}",
+  "trees_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/git/trees{/sha}",
+  "statuses_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/statuses/{sha}",
+  "languages_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/languages",
+  "stargazers_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/stargazers",
+  "contributors_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/contributors",
+  "subscribers_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/subscribers",
+  "subscription_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/subscription",
+  "commits_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/commits{/sha}",
+  "git_commits_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/git/commits{/sha}",
+  "comments_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/comments{/number}",
+  "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/issues/comments{/number}",
+  "contents_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/contents/{+path}",
+  "compare_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/compare/{base}...{head}",
+  "merges_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/merges",
+  "archive_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/{archive_format}{/ref}",
+  "downloads_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/downloads",
+  "issues_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/issues{/number}",
+  "pulls_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/pulls{/number}",
+  "milestones_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/milestones{/number}",
+  "notifications_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/notifications{?since,all,participating}",
+  "labels_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/labels{/name}",
+  "releases_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/releases{/id}",
+  "deployments_url": "https://api.github.com/repos/hub4j-test-org/test-permission-private/deployments",
+  "created_at": "2022-04-18T19:16:27Z",
+  "updated_at": "2022-04-18T19:16:27Z",
+  "pushed_at": "2022-04-18T19:16:28Z",
+  "git_url": "git://github.com/hub4j-test-org/test-permission-private.git",
+  "ssh_url": "git@github.com:hub4j-test-org/test-permission-private.git",
+  "clone_url": "https://github.com/hub4j-test-org/test-permission-private.git",
+  "svn_url": "https://github.com/hub4j-test-org/test-permission-private",
+  "homepage": null,
+  "size": 0,
+  "stargazers_count": 0,
+  "watchers_count": 0,
+  "language": null,
+  "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": 0,
+  "license": null,
+  "allow_forking": false,
+  "is_template": false,
+  "topics": [],
+  "visibility": "private",
+  "forks": 0,
+  "open_issues": 0,
+  "watchers": 0,
+  "default_branch": "main",
+  "permissions": {
+    "admin": true,
+    "maintain": true,
+    "push": true,
+    "triage": true,
+    "pull": true
+  },
+  "temp_clone_token": "AAJYOBKAHLMJYGJO3CR6QP3CLXBUI",
+  "allow_squash_merge": true,
+  "allow_merge_commit": true,
+  "allow_rebase_merge": true,
+  "allow_auto_merge": false,
+  "delete_branch_on_merge": false,
+  "allow_update_branch": false,
+  "organization": {
+    "login": "hub4j-test-org",
+    "id": 7544739,
+    "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+    "avatar_url": "https://avatars.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
+  },
+  "network_count": 0,
+  "subscribers_count": 17
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json
new file mode 100644
index 000000000..1bb84ef47
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json
@@ -0,0 +1,32 @@
+{
+  "permission": "none",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": false
+    },
+    "role_name": ""
+  },
+  "role_name": ""
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json
new file mode 100644
index 000000000..1bb84ef47
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json
@@ -0,0 +1,32 @@
+{
+  "permission": "none",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": false
+    },
+    "role_name": ""
+  },
+  "role_name": ""
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json
new file mode 100644
index 000000000..1bb84ef47
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json
@@ -0,0 +1,32 @@
+{
+  "permission": "none",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": false
+    },
+    "role_name": ""
+  },
+  "role_name": ""
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json
new file mode 100644
index 000000000..1bb84ef47
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json
@@ -0,0 +1,32 @@
+{
+  "permission": "none",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": false
+    },
+    "role_name": ""
+  },
+  "role_name": ""
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json
new file mode 100644
index 000000000..b0f16df08
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json
@@ -0,0 +1,32 @@
+{
+  "permission": "read",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": true
+    },
+    "role_name": "read"
+  },
+  "role_name": "read"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json
new file mode 100644
index 000000000..b0f16df08
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json
@@ -0,0 +1,32 @@
+{
+  "permission": "read",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": true
+    },
+    "role_name": "read"
+  },
+  "role_name": "read"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json
new file mode 100644
index 000000000..b0f16df08
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json
@@ -0,0 +1,32 @@
+{
+  "permission": "read",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": true
+    },
+    "role_name": "read"
+  },
+  "role_name": "read"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json
new file mode 100644
index 000000000..b0f16df08
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json
@@ -0,0 +1,32 @@
+{
+  "permission": "read",
+  "user": {
+    "login": "dude",
+    "id": 60431,
+    "node_id": "MDQ6VXNlcjYwNDMx",
+    "avatar_url": "https://avatars.githubusercontent.com/u/60431?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/dude",
+    "html_url": "https://github.com/dude",
+    "followers_url": "https://api.github.com/users/dude/followers",
+    "following_url": "https://api.github.com/users/dude/following{/other_user}",
+    "gists_url": "https://api.github.com/users/dude/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/dude/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/dude/subscriptions",
+    "organizations_url": "https://api.github.com/users/dude/orgs",
+    "repos_url": "https://api.github.com/users/dude/repos",
+    "events_url": "https://api.github.com/users/dude/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/dude/received_events",
+    "type": "User",
+    "site_admin": false,
+    "permissions": {
+      "admin": false,
+      "maintain": false,
+      "push": false,
+      "triage": false,
+      "pull": true
+    },
+    "role_name": "read"
+  },
+  "role_name": "read"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json
new file mode 100644
index 000000000..b320edf07
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json
@@ -0,0 +1,32 @@
+{
+  "permission": "admin",
+  "user": {
+    "login": "kohsuke",
+    "id": 50003,
+    "node_id": "MDQ6VXNlcjUwMDAz",
+    "avatar_url": "https://avatars.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,
+      "maintain": true,
+      "push": true,
+      "triage": true,
+      "pull": true
+    },
+    "role_name": "admin"
+  },
+  "role_name": "admin"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/users_kohsuke-10.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/users_kohsuke-10.json
new file mode 100644
index 000000000..b0bb3da44
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/__files/users_kohsuke-10.json
@@ -0,0 +1,34 @@
+{
+  "login": "kohsuke",
+  "id": 50003,
+  "node_id": "MDQ6VXNlcjUwMDAz",
+  "avatar_url": "https://avatars.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,
+  "name": "Kohsuke Kawaguchi",
+  "company": "@launchableinc ",
+  "blog": "https://www.kohsuke.org/",
+  "location": "San Jose, California",
+  "email": "kk@kohsuke.org",
+  "hireable": null,
+  "bio": null,
+  "twitter_username": null,
+  "public_repos": 265,
+  "public_gists": 113,
+  "followers": 1999,
+  "following": 3,
+  "created_at": "2009-01-28T18:53:21Z",
+  "updated_at": "2022-04-10T22:58:15Z"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-1.json
new file mode 100644
index 000000000..b8277c0fc
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-1.json
@@ -0,0 +1,47 @@
+{
+  "id": "bcc6e97e-69aa-475d-b26e-7af66c2eb529",
+  "name": "repos_hub4j-test-org_test-permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission-1.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:01 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"138b745eb1b48b175ba2335fb60765e84cb1ac1b444a1169a2bc696001359aed\"",
+      "Last-Modified": "Tue, 10 Jan 2017 00:22:47 GMT",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4973",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "27",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7A0:AFDA:EFE04A:F7D343:625DC214"
+    }
+  },
+  "uuid": "bcc6e97e-69aa-475d-b26e-7af66c2eb529",
+  "persistent": true,
+  "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private-15.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private-15.json
new file mode 100644
index 000000000..af654d76a
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private-15.json
@@ -0,0 +1,47 @@
+{
+  "id": "e9af413f-1a5b-42d2-be7f-c01a053ee822",
+  "name": "repos_hub4j-test-org_test-permission-private",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission-private",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission-private-15.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:04 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"04d12013a7456daabb798bac37bd6af1b4202fe6aeb99b6fffde7a3fe9aaaa41\"",
+      "Last-Modified": "Mon, 18 Apr 2022 19:16:27 GMT",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4959",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "41",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7BC:373A:1A5E18F:1AF0EEA:625DC218"
+    }
+  },
+  "uuid": "e9af413f-1a5b-42d2-be7f-c01a053ee822",
+  "persistent": true,
+  "insertionIndex": 15
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json
new file mode 100644
index 000000000..b829d245e
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json
@@ -0,0 +1,49 @@
+{
+  "id": "920509f5-fecc-4e90-8479-0099648250d1",
+  "name": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission-private/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-16.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:04 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"fb94f5854d73bb38b3f8bb4e858cf55f841a778627efd77b5defa9c528dd4114\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4958",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "42",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7BE:DE7D:19C5854:1A57980:625DC218"
+    }
+  },
+  "uuid": "920509f5-fecc-4e90-8479-0099648250d1",
+  "persistent": true,
+  "scenarioName": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission",
+  "requiredScenarioState": "Started",
+  "newScenarioState": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission-2",
+  "insertionIndex": 16
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json
new file mode 100644
index 000000000..f8dccaf0e
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json
@@ -0,0 +1,49 @@
+{
+  "id": "c27c7b2c-5674-471d-9972-b71f5059d1fe",
+  "name": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission-private/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-17.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:05 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"fb94f5854d73bb38b3f8bb4e858cf55f841a778627efd77b5defa9c528dd4114\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4957",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "43",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7C0:AFDB:18F7612:19897B6:625DC218"
+    }
+  },
+  "uuid": "c27c7b2c-5674-471d-9972-b71f5059d1fe",
+  "persistent": true,
+  "scenarioName": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission",
+  "requiredScenarioState": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission-2",
+  "newScenarioState": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission-3",
+  "insertionIndex": 17
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json
new file mode 100644
index 000000000..ff1b3d8f2
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json
@@ -0,0 +1,49 @@
+{
+  "id": "3f763e1f-cb20-4a71-9b7f-320b096aafbb",
+  "name": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission-private/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-18.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:05 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"fb94f5854d73bb38b3f8bb4e858cf55f841a778627efd77b5defa9c528dd4114\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4956",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "44",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7C2:AFDC:24C35D8:25674E3:625DC219"
+    }
+  },
+  "uuid": "3f763e1f-cb20-4a71-9b7f-320b096aafbb",
+  "persistent": true,
+  "scenarioName": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission",
+  "requiredScenarioState": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission-3",
+  "newScenarioState": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission-4",
+  "insertionIndex": 18
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json
new file mode 100644
index 000000000..446a99a87
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json
@@ -0,0 +1,48 @@
+{
+  "id": "aade53cc-f9c8-4575-8c84-a119aa72a772",
+  "name": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission-private/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission-private_collaborators_dude_permission-19.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:05 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"fb94f5854d73bb38b3f8bb4e858cf55f841a778627efd77b5defa9c528dd4114\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4955",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "45",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7C4:C448:2A6C47B:2B15245:625DC219"
+    }
+  },
+  "uuid": "aade53cc-f9c8-4575-8c84-a119aa72a772",
+  "persistent": true,
+  "scenarioName": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission",
+  "requiredScenarioState": "scenario-3-repos-hub4j-test-org-test-permission-private-collaborators-dude-permission-4",
+  "insertionIndex": 19
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json
new file mode 100644
index 000000000..cbb30d7b9
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json
@@ -0,0 +1,49 @@
+{
+  "id": "01c45756-ee35-4b6d-a16c-6a548d587581",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_dude_permission-6.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:02 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"1cc3cc5489c97f91330041a79e27736832eaa8c8a53d3ef48479ea73bce528d8\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4968",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "32",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7AA:53CF:256FACF:2614599:625DC216"
+    }
+  },
+  "uuid": "01c45756-ee35-4b6d-a16c-6a548d587581",
+  "persistent": true,
+  "scenarioName": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission",
+  "requiredScenarioState": "Started",
+  "newScenarioState": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission-2",
+  "insertionIndex": 6
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json
new file mode 100644
index 000000000..49097857f
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json
@@ -0,0 +1,49 @@
+{
+  "id": "1e2e0c5e-2e96-4a39-bb7e-517c7d30d55d",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_dude_permission-7.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:02 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"1cc3cc5489c97f91330041a79e27736832eaa8c8a53d3ef48479ea73bce528d8\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4967",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "33",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7AC:13A5F:E053B5:E834BA:625DC216"
+    }
+  },
+  "uuid": "1e2e0c5e-2e96-4a39-bb7e-517c7d30d55d",
+  "persistent": true,
+  "scenarioName": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission",
+  "requiredScenarioState": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission-2",
+  "newScenarioState": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission-3",
+  "insertionIndex": 7
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json
new file mode 100644
index 000000000..3780ba474
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json
@@ -0,0 +1,49 @@
+{
+  "id": "076c65b3-da23-485b-9e89-bbf61501d76e",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_dude_permission-8.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:02 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"1cc3cc5489c97f91330041a79e27736832eaa8c8a53d3ef48479ea73bce528d8\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4966",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "34",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7AE:B976:265343E:26FAA35:625DC216"
+    }
+  },
+  "uuid": "076c65b3-da23-485b-9e89-bbf61501d76e",
+  "persistent": true,
+  "scenarioName": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission",
+  "requiredScenarioState": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission-3",
+  "newScenarioState": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission-4",
+  "insertionIndex": 8
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json
new file mode 100644
index 000000000..ebf251d86
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json
@@ -0,0 +1,48 @@
+{
+  "id": "933b7407-cc71-45b7-884a-443dae65c361",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_dude_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/dude/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_dude_permission-9.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"1cc3cc5489c97f91330041a79e27736832eaa8c8a53d3ef48479ea73bce528d8\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4965",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "35",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7B0:AFDC:24C31CE:25670D5:625DC216"
+    }
+  },
+  "uuid": "933b7407-cc71-45b7-884a-443dae65c361",
+  "persistent": true,
+  "scenarioName": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission",
+  "requiredScenarioState": "scenario-2-repos-hub4j-test-org-test-permission-collaborators-dude-permission-4",
+  "insertionIndex": 9
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json
new file mode 100644
index 000000000..a1ea71c6c
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json
@@ -0,0 +1,49 @@
+{
+  "id": "c388a81b-7d93-4f51-8318-5f2d046840b0",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-11.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4963",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "37",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7B4:C446:DB96E5:E3963B:625DC217"
+    }
+  },
+  "uuid": "c388a81b-7d93-4f51-8318-5f2d046840b0",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-5",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-6",
+  "insertionIndex": 11
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json
new file mode 100644
index 000000000..55c40f27d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json
@@ -0,0 +1,49 @@
+{
+  "id": "3b415ba6-e21e-4bb4-b068-7ee9d82d80b0",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-12.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4962",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "38",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7B6:373B:2714A03:27BCE36:625DC217"
+    }
+  },
+  "uuid": "3b415ba6-e21e-4bb4-b068-7ee9d82d80b0",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-6",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-7",
+  "insertionIndex": 12
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json
new file mode 100644
index 000000000..de4d7c699
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json
@@ -0,0 +1,49 @@
+{
+  "id": "d292349e-fe6a-46bf-a79d-56275436dc66",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-13.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4961",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "39",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7B8:373B:2714A8D:27BCEB1:625DC217"
+    }
+  },
+  "uuid": "d292349e-fe6a-46bf-a79d-56275436dc66",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-7",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-8",
+  "insertionIndex": 13
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json
new file mode 100644
index 000000000..77a048021
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json
@@ -0,0 +1,48 @@
+{
+  "id": "2a53d18f-7f36-4705-8f67-d81b8a52a7bd",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-14.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:04 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4960",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "40",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7BA:5714:5EFA0C:661EEE:625DC218"
+    }
+  },
+  "uuid": "2a53d18f-7f36-4705-8f67-d81b8a52a7bd",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-8",
+  "insertionIndex": 14
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json
new file mode 100644
index 000000000..49d0d22de
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json
@@ -0,0 +1,49 @@
+{
+  "id": "7f39602b-88d5-481f-b22b-2236ca540259",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-2.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:01 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4972",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "28",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7A2:265B:28D17A2:297BD40:625DC215"
+    }
+  },
+  "uuid": "7f39602b-88d5-481f-b22b-2236ca540259",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "Started",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-2",
+  "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json
new file mode 100644
index 000000000..3a59664b2
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json
@@ -0,0 +1,49 @@
+{
+  "id": "af65185d-5f5c-40b8-97fc-84548a81d981",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-3.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:01 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4971",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "29",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7A4:13A60:183892B:18C9D18:625DC215"
+    }
+  },
+  "uuid": "af65185d-5f5c-40b8-97fc-84548a81d981",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-2",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-3",
+  "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json
new file mode 100644
index 000000000..65b8051cc
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json
@@ -0,0 +1,49 @@
+{
+  "id": "6e7c5b20-462c-4d99-a475-0fc0542b8b57",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-4.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:01 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4970",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "30",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7A6:A10A:18E1046:1972AD5:625DC215"
+    }
+  },
+  "uuid": "6e7c5b20-462c-4d99-a475-0fc0542b8b57",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-3",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-4",
+  "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json
new file mode 100644
index 000000000..3edd3c46e
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json
@@ -0,0 +1,49 @@
+{
+  "id": "8d75c13d-dbc2-499b-a5ec-2a11153bbbec",
+  "name": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission",
+  "request": {
+    "url": "/repos/hub4j-test-org/test-permission/collaborators/kohsuke/permission",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "repos_hub4j-test-org_test-permission_collaborators_kohsuke_permission-5.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:02 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"81b4768f35337875d66460bab6be08a8e6bbc7b986abd4427e99b4157fe965c0\"",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4969",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "31",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7A8:8952:E218E8:EA0F76:625DC216"
+    }
+  },
+  "uuid": "8d75c13d-dbc2-499b-a5ec-2a11153bbbec",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission",
+  "requiredScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-4",
+  "newScenarioState": "scenario-1-repos-hub4j-test-org-test-permission-collaborators-kohsuke-permission-5",
+  "insertionIndex": 5
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/users_kohsuke-10.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/users_kohsuke-10.json
new file mode 100644
index 000000000..1aaa7bc71
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/hasPermission/mappings/users_kohsuke-10.json
@@ -0,0 +1,47 @@
+{
+  "id": "8e9d982b-ca60-4410-a263-d2c49834c0df",
+  "name": "users_kohsuke",
+  "request": {
+    "url": "/users/kohsuke",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github.v3+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "users_kohsuke-10.json",
+    "headers": {
+      "Server": "GitHub.com",
+      "Date": "Mon, 18 Apr 2022 19:55:03 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": [
+        "Accept, Authorization, Cookie, X-GitHub-OTP",
+        "Accept-Encoding, Accept, X-Requested-With"
+      ],
+      "ETag": "W/\"4ca7cbddf39c9811d84469a3e5d3d4e4e577b18bc9798e19eac336ba991a7300\"",
+      "Last-Modified": "Sun, 10 Apr 2022 22:58:15 GMT",
+      "X-OAuth-Scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, workflow, write:discussion",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4964",
+      "X-RateLimit-Reset": "1650312871",
+      "X-RateLimit-Used": "36",
+      "X-RateLimit-Resource": "core",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "X-GitHub-Request-Id": "C7B2:C448:2A6BF2A:2B14CE1:625DC217"
+    }
+  },
+  "uuid": "8e9d982b-ca60-4410-a263-d2c49834c0df",
+  "persistent": true,
+  "insertionIndex": 10
+}
\ No newline at end of file