diff --git a/src/main/java/org/kohsuke/github/GHPerson.java b/src/main/java/org/kohsuke/github/GHPerson.java index 407136083d..19750ccff7 100644 --- a/src/main/java/org/kohsuke/github/GHPerson.java +++ b/src/main/java/org/kohsuke/github/GHPerson.java @@ -9,6 +9,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.TreeMap; /** @@ -28,6 +29,9 @@ public abstract class GHPerson extends GHObject { protected int followers, following, public_repos, public_gists; protected boolean site_admin; + // other fields (that only show up in full data) that require privileged scope + protected Integer total_private_repos; + GHPerson wrapUp(GitHub root) { this.root = root; return this; @@ -346,4 +350,16 @@ public boolean isSiteAdmin() throws IOException { populate(); return site_admin; } + + /** + * Gets total private repo count. + * + * @return the total private repo count + * @throws IOException + * the io exception + */ + public Optional getTotalPrivateRepoCount() throws IOException { + populate(); + return Optional.ofNullable(total_private_repos); + } } diff --git a/src/test/java/org/kohsuke/github/GHUserTest.java b/src/test/java/org/kohsuke/github/GHUserTest.java index 4acd3fcc4e..d77f190166 100644 --- a/src/test/java/org/kohsuke/github/GHUserTest.java +++ b/src/test/java/org/kohsuke/github/GHUserTest.java @@ -1,16 +1,13 @@ package org.kohsuke.github; +import org.junit.Assert; import org.junit.Test; import java.io.IOException; import java.util.*; import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.hamcrest.Matchers.greaterThan; public class GHUserTest extends AbstractGitHubWireMockTest { @Test @@ -87,4 +84,20 @@ public void listPublicRepositoriesPageSize62() throws IOException { assertThat(i, equalTo(115)); } + @Test + public void createAndCountPrivateRepos() throws IOException { + String login = gitHub.getMyself().getLogin(); + + GHRepository repository = gitHub.createRepository("github-user-test-private-repo") + .description("a test private repository used to test kohsuke's github-api") + .homepage("http://github-api.kohsuke.org/").private_(true).create(); + + try { + Assert.assertNotNull(repository); + GHUser ghUser = gitHub.getUser(login); + assertThat(ghUser.getTotalPrivateRepoCount().orElse(-1), greaterThan(0)); + } finally { + repository.delete(); + } + } } diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/user-9c77ca90-ac6b-4375-8c32-7669b7dec98d.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/user-9c77ca90-ac6b-4375-8c32-7669b7dec98d.json new file mode 100644 index 0000000000..1c08033b3e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/user-9c77ca90-ac6b-4375-8c32-7669b7dec98d.json @@ -0,0 +1,45 @@ +{ + "login": "kohsuke", + "id": 5396306, + "node_id": "MDQ6VXNlcjUzOTYzMDY=", + "avatar_url": "https://avatars3.githubusercontent.com/u/5396306?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": "Sage Pierce", + "company": "@Vrbo @ExpediaGroup", + "blog": "", + "location": null, + "email": "sapierce@vrbo.com", + "hireable": true, + "bio": "Software engineer with a Masters of Science in Electrical and Computer Engineering out of The University of Texas at Austin.", + "public_repos": 9, + "public_gists": 0, + "followers": 4, + "following": 0, + "created_at": "2013-09-06T02:22:48Z", + "updated_at": "2020-01-31T17:19:20Z", + "private_gists": 0, + "total_private_repos": 0, + "owned_private_repos": 0, + "disk_usage": 1816, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/user_repos-1c6314f8-ce12-4181-8ba9-d7389c1774e9.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/user_repos-1c6314f8-ce12-4181-8ba9-d7389c1774e9.json new file mode 100644 index 0000000000..f7891cdc07 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/user_repos-1c6314f8-ce12-4181-8ba9-d7389c1774e9.json @@ -0,0 +1,105 @@ +{ + "id": 237495575, + "node_id": "MDEwOlJlcG9zaXRvcnkyMzc0OTU1NzU=", + "name": "github-user-test-private-repo", + "full_name": "kohsuke/github-user-test-private-repo", + "private": true, + "owner": { + "login": "kohsuke", + "id": 5396306, + "node_id": "MDQ6VXNlcjUzOTYzMDY=", + "avatar_url": "https://avatars3.githubusercontent.com/u/5396306?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 + }, + "html_url": "https://github.com/kohsuke/github-user-test-private-repo", + "description": "a test private repository used to test kohsuke's github-api", + "fork": false, + "url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo", + "forks_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/forks", + "keys_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/teams", + "hooks_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/hooks", + "issue_events_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/events", + "assignees_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/tags", + "blobs_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/languages", + "stargazers_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/stargazers", + "contributors_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/contributors", + "subscribers_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/subscribers", + "subscription_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/subscription", + "commits_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/merges", + "archive_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/downloads", + "issues_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/kohsuke/github-user-test-private-repo/deployments", + "created_at": "2020-01-31T18:52:44Z", + "updated_at": "2020-01-31T18:52:44Z", + "pushed_at": "2020-01-31T18:52:45Z", + "git_url": "git://github.com/kohsuke/github-user-test-private-repo.git", + "ssh_url": "git@github.com:kohsuke/github-user-test-private-repo.git", + "clone_url": "https://github.com/kohsuke/github-user-test-private-repo.git", + "svn_url": "https://github.com/kohsuke/github-user-test-private-repo", + "homepage": "http://github-api.kohsuke.org/", + "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, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "delete_branch_on_merge": false, + "network_count": 0, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/users_kohsuke-f2bb88fe-c538-45f8-88cb-7a3acaca2544.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/users_kohsuke-f2bb88fe-c538-45f8-88cb-7a3acaca2544.json new file mode 100644 index 0000000000..d61a01b7ea --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/__files/users_kohsuke-f2bb88fe-c538-45f8-88cb-7a3acaca2544.json @@ -0,0 +1,45 @@ +{ + "login": "kohsuke", + "id": 5396306, + "node_id": "MDQ6VXNlcjUzOTYzMDY=", + "avatar_url": "https://avatars3.githubusercontent.com/u/5396306?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": "Sage Pierce", + "company": "@Vrbo @ExpediaGroup", + "blog": "", + "location": null, + "email": "sapierce@vrbo.com", + "hireable": true, + "bio": "Software engineer with a Masters of Science in Electrical and Computer Engineering out of The University of Texas at Austin.", + "public_repos": 9, + "public_gists": 0, + "followers": 4, + "following": 0, + "created_at": "2013-09-06T02:22:48Z", + "updated_at": "2020-01-31T17:19:20Z", + "private_gists": 0, + "total_private_repos": 1, + "owned_private_repos": 1, + "disk_usage": 1816, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/repos_kohsuke_github-user-test-private-repo-4-666cac.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/repos_kohsuke_github-user-test-private-repo-4-666cac.json new file mode 100644 index 0000000000..5a5a9d0cc1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/repos_kohsuke_github-user-test-private-repo-4-666cac.json @@ -0,0 +1,39 @@ +{ + "id": "666cac17-c8fc-49b9-a2eb-b9667c2ea446", + "name": "repos_kohsuke_github-user-test-private-repo", + "request": { + "url": "/repos/kohsuke/github-user-test-private-repo", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 204, + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 31 Jan 2020 18:52:46 GMT", + "Status": "204 No Content", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4950", + "X-RateLimit-Reset": "1580498839", + "X-OAuth-Scopes": "delete_repo, repo, user", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "3123:3DD0:725FE2:11566AB:5E34777E" + } + }, + "uuid": "666cac17-c8fc-49b9-a2eb-b9667c2ea446", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user-1-9c77ca.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user-1-9c77ca.json new file mode 100644 index 0000000000..33ee68825e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user-1-9c77ca.json @@ -0,0 +1,45 @@ +{ + "id": "9c77ca90-ac6b-4375-8c32-7669b7dec98d", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-9c77ca90-ac6b-4375-8c32-7669b7dec98d.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 31 Jan 2020 18:52:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4954", + "X-RateLimit-Reset": "1580498839", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", + "ETag": "W/\"444582ac6464d28b8a4c8914fb11b2ea\"", + "Last-Modified": "Fri, 31 Jan 2020 17:19:20 GMT", + "X-OAuth-Scopes": "delete_repo, repo, user", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "3123:3DD0:725F2C:115653E:5E34777B" + } + }, + "uuid": "9c77ca90-ac6b-4375-8c32-7669b7dec98d", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user_repos-2-1c6314.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user_repos-2-1c6314.json new file mode 100644 index 0000000000..949ab895f6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user_repos-2-1c6314.json @@ -0,0 +1,52 @@ +{ + "id": "1c6314f8-ce12-4181-8ba9-d7389c1774e9", + "name": "user_repos", + "request": { + "url": "/user/repos", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"private\":true,\"name\":\"github-user-test-private-repo\",\"description\":\"a test private repository used to test kohsuke's github-api\",\"homepage\":\"http://github-api.kohsuke.org/\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "user_repos-1c6314f8-ce12-4181-8ba9-d7389c1774e9.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 31 Jan 2020 18:52:46 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "201 Created", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4952", + "X-RateLimit-Reset": "1580498839", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", + "ETag": "\"939fd186230e8cf21c2e42ae3b256921\"", + "X-OAuth-Scopes": "delete_repo, repo, user", + "X-Accepted-OAuth-Scopes": "public_repo, repo", + "Location": "https://api.github.com/repos/kohsuke/github-user-test-private-repo", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "3123:3DD0:725F68:115655A:5E34777C" + } + }, + "uuid": "1c6314f8-ce12-4181-8ba9-d7389c1774e9", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/users_kohsuke-3-f2bb88.json b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/users_kohsuke-3-f2bb88.json new file mode 100644 index 0000000000..2c08b7fbd2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/users_kohsuke-3-f2bb88.json @@ -0,0 +1,45 @@ +{ + "id": "f2bb88fe-c538-45f8-88cb-7a3acaca2544", + "name": "users_kohsuke", + "request": { + "url": "/users/kohsuke", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "users_kohsuke-f2bb88fe-c538-45f8-88cb-7a3acaca2544.json", + "headers": { + "Server": "GitHub.com", + "Date": "Fri, 31 Jan 2020 18:52:46 GMT", + "Content-Type": "application/json; charset=utf-8", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4951", + "X-RateLimit-Reset": "1580498839", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", + "ETag": "W/\"0b40f25c12310d9b484a8e9812ffc9a8\"", + "Last-Modified": "Fri, 31 Jan 2020 17:19:20 GMT", + "X-OAuth-Scopes": "delete_repo, repo, user", + "X-Accepted-OAuth-Scopes": "", + "X-GitHub-Media-Type": "unknown, github.v3", + "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", + "Access-Control-Allow-Origin": "*", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "3123:3DD0:725FDA:115668B:5E34777E" + } + }, + "uuid": "f2bb88fe-c538-45f8-88cb-7a3acaca2544", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file