-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#690]Implement the ability to read
total_private_repos
for GHPerson
- Loading branch information
spierce
committed
Jan 31, 2020
1 parent
79fb343
commit 84dd06d
Showing
9 changed files
with
410 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...iremock/createAndCountPrivateRepos/__files/user-9c77ca90-ac6b-4375-8c32-7669b7dec98d.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "[email protected]", | ||
"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 | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
...k/createAndCountPrivateRepos/__files/user_repos-1c6314f8-ce12-4181-8ba9-d7389c1774e9.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "[email protected]: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 | ||
} |
45 changes: 45 additions & 0 deletions
45
...reateAndCountPrivateRepos/__files/users_kohsuke-f2bb88fe-c538-45f8-88cb-7a3acaca2544.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "[email protected]", | ||
"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 | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...teAndCountPrivateRepos/mappings/repos_kohsuke_github-user-test-private-repo-4-666cac.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
45 changes: 45 additions & 0 deletions
45
...kohsuke/github/GHUserTest/wiremock/createAndCountPrivateRepos/mappings/user-1-9c77ca.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
Oops, something went wrong.