-
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.
Add parameter to listContributors for anonymous contributors (#1907)
* Add listContributors method parameter to determine whether to include anonymous contributors. Fixes #1905 * Add Javadoc link annotation * Add test * Update src/main/java/org/kohsuke/github/GHRepository.java Committing @bitwiseman suggestion Co-authored-by: Liam Newman <[email protected]> * Update src/main/java/org/kohsuke/github/GHRepository.java Committing @bitwiseman suggestion Co-authored-by: Liam Newman <[email protected]> * Fix javadoc * Update tests * Change assertion style --------- Co-authored-by: Liam Newman <[email protected]>
- Loading branch information
1 parent
4732768
commit c8f4815
Showing
12 changed files
with
1,172 additions
and
1 deletion.
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
...ces/org/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/1-user.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": "bitwiseman", | ||
"id": 1958953, | ||
"node_id": "MDQ6VXNlcjE5NTg5NTM=", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/bitwiseman", | ||
"html_url": "https://github.com/bitwiseman", | ||
"followers_url": "https://api.github.com/users/bitwiseman/followers", | ||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", | ||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs", | ||
"repos_url": "https://api.github.com/users/bitwiseman/repos", | ||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events", | ||
"type": "User", | ||
"site_admin": false, | ||
"name": "Liam Newman", | ||
"company": "Cloudbees, Inc.", | ||
"blog": "", | ||
"location": "Seattle, WA, USA", | ||
"email": "[email protected]", | ||
"hireable": null, | ||
"bio": "https://twitter.com/bitwiseman", | ||
"public_repos": 167, | ||
"public_gists": 4, | ||
"followers": 136, | ||
"following": 9, | ||
"created_at": "2012-07-11T20:38:33Z", | ||
"updated_at": "2019-09-24T19:32:29Z", | ||
"private_gists": 7, | ||
"total_private_repos": 9, | ||
"owned_private_repos": 0, | ||
"disk_usage": 33697, | ||
"collaborators": 0, | ||
"two_factor_authentication": true, | ||
"plan": { | ||
"name": "free", | ||
"space": 976562499, | ||
"collaborators": 0, | ||
"private_repos": 10000 | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...hsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/10-users_kohsuke.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,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": "[email protected]", | ||
"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" | ||
} |
41 changes: 41 additions & 0 deletions
41
...g/kohsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/2-orgs_hub4j.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,41 @@ | ||
{ | ||
"login": "hub4j", | ||
"id": 54909825, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", | ||
"url": "https://api.github.com/orgs/hub4j", | ||
"repos_url": "https://api.github.com/orgs/hub4j/repos", | ||
"events_url": "https://api.github.com/orgs/hub4j/events", | ||
"hooks_url": "https://api.github.com/orgs/hub4j/hooks", | ||
"issues_url": "https://api.github.com/orgs/hub4j/issues", | ||
"members_url": "https://api.github.com/orgs/hub4j/members{/member}", | ||
"public_members_url": "https://api.github.com/orgs/hub4j/public_members{/member}", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", | ||
"description": null, | ||
"is_verified": false, | ||
"has_organization_projects": true, | ||
"has_repository_projects": true, | ||
"public_repos": 1, | ||
"public_gists": 0, | ||
"followers": 0, | ||
"following": 0, | ||
"html_url": "https://github.com/hub4j", | ||
"created_at": "2019-09-04T18:12:34Z", | ||
"updated_at": "2019-09-04T18:12:34Z", | ||
"type": "Organization", | ||
"total_private_repos": 0, | ||
"owned_private_repos": 0, | ||
"private_gists": 0, | ||
"disk_usage": 11899, | ||
"collaborators": 0, | ||
"billing_email": "[email protected]", | ||
"default_repository_permission": "read", | ||
"members_can_create_repositories": true, | ||
"two_factor_requirement_enabled": false, | ||
"plan": { | ||
"name": "free", | ||
"space": 976562499, | ||
"private_repos": 0, | ||
"filled_seats": 2, | ||
"seats": 0 | ||
} | ||
} |
130 changes: 130 additions & 0 deletions
130
...hsuke/github/GHRepositoryTest/wiremock/listContributorsAnon/__files/3-r_h_github-api.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,130 @@ | ||
{ | ||
"id": 617210, | ||
"node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", | ||
"name": "github-api", | ||
"full_name": "hub4j/github-api", | ||
"private": false, | ||
"owner": { | ||
"login": "hub4j", | ||
"id": 54909825, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/hub4j", | ||
"html_url": "https://github.com/hub4j", | ||
"followers_url": "https://api.github.com/users/hub4j/followers", | ||
"following_url": "https://api.github.com/users/hub4j/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", | ||
"organizations_url": "https://api.github.com/users/hub4j/orgs", | ||
"repos_url": "https://api.github.com/users/hub4j/repos", | ||
"events_url": "https://api.github.com/users/hub4j/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/hub4j/received_events", | ||
"type": "Organization", | ||
"site_admin": false | ||
}, | ||
"html_url": "https://github.com/hub4j/github-api", | ||
"description": "Java API for GitHub", | ||
"fork": false, | ||
"url": "https://api.github.com/repos/hub4j/github-api", | ||
"forks_url": "https://api.github.com/repos/hub4j/github-api/forks", | ||
"keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", | ||
"collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", | ||
"teams_url": "https://api.github.com/repos/hub4j/github-api/teams", | ||
"hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", | ||
"issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", | ||
"events_url": "https://api.github.com/repos/hub4j/github-api/events", | ||
"assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", | ||
"branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", | ||
"tags_url": "https://api.github.com/repos/hub4j/github-api/tags", | ||
"blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", | ||
"git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", | ||
"git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", | ||
"trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", | ||
"statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", | ||
"languages_url": "https://api.github.com/repos/hub4j/github-api/languages", | ||
"stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", | ||
"contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors?anon=true", | ||
"subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", | ||
"subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", | ||
"commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", | ||
"git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", | ||
"comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", | ||
"issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", | ||
"contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", | ||
"compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", | ||
"merges_url": "https://api.github.com/repos/hub4j/github-api/merges", | ||
"archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", | ||
"downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", | ||
"issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", | ||
"pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", | ||
"milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", | ||
"notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", | ||
"labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", | ||
"releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", | ||
"deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", | ||
"created_at": "2010-04-19T04:13:03Z", | ||
"updated_at": "2019-10-03T09:41:10Z", | ||
"pushed_at": "2019-10-02T22:27:45Z", | ||
"git_url": "git://github.com/hub4j/github-api.git", | ||
"ssh_url": "[email protected]:hub4j/github-api.git", | ||
"clone_url": "https://github.com/hub4j/github-api.git", | ||
"svn_url": "https://github.com/hub4j/github-api", | ||
"homepage": "http://github-api.kohsuke.org/", | ||
"size": 11899, | ||
"stargazers_count": 557, | ||
"watchers_count": 557, | ||
"language": "Java", | ||
"has_issues": true, | ||
"has_projects": true, | ||
"has_downloads": true, | ||
"has_wiki": true, | ||
"has_pages": true, | ||
"forks_count": 428, | ||
"mirror_url": null, | ||
"archived": false, | ||
"disabled": false, | ||
"open_issues_count": 90, | ||
"license": { | ||
"key": "mit", | ||
"name": "MIT License", | ||
"spdx_id": "MIT", | ||
"url": "https://api.github.com/licenses/mit", | ||
"node_id": "MDc6TGljZW5zZTEz" | ||
}, | ||
"forks": 428, | ||
"open_issues": 90, | ||
"watchers": 557, | ||
"default_branch": "main", | ||
"permissions": { | ||
"admin": true, | ||
"push": true, | ||
"pull": true | ||
}, | ||
"allow_squash_merge": true, | ||
"allow_merge_commit": true, | ||
"allow_rebase_merge": true, | ||
"organization": { | ||
"login": "hub4j", | ||
"id": 54909825, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/hub4j", | ||
"html_url": "https://github.com/hub4j", | ||
"followers_url": "https://api.github.com/users/hub4j/followers", | ||
"following_url": "https://api.github.com/users/hub4j/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", | ||
"organizations_url": "https://api.github.com/users/hub4j/orgs", | ||
"repos_url": "https://api.github.com/users/hub4j/repos", | ||
"events_url": "https://api.github.com/users/hub4j/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/hub4j/received_events", | ||
"type": "Organization", | ||
"site_admin": false | ||
}, | ||
"network_count": 428, | ||
"subscribers_count": 50 | ||
} |
Oops, something went wrong.