-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get memberships of an organisation by username (#1850)
* feat: get memberships of an organisation by username * chore: link appropriate GitHub docs * chore: spotless apply * chore: clean comments and remove tool-versions * chore: replace custom org with officially supported hub4j-test-org
- Loading branch information
Showing
8 changed files
with
334 additions
and
10 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
34 changes: 34 additions & 0 deletions
34
...rces/org/kohsuke/github/GHOrganizationTest/wiremock/testGetMembership/__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,34 @@ | ||
{ | ||
"login": "fv316", | ||
"id": 34072742, | ||
"node_id": "MDQ6VXNlcjM0MDcyNzQy", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/34072742?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/fv316", | ||
"html_url": "https://github.com/fv316", | ||
"followers_url": "https://api.github.com/users/fv316/followers", | ||
"following_url": "https://api.github.com/users/fv316/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/fv316/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/fv316/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/fv316/subscriptions", | ||
"organizations_url": "https://api.github.com/users/fv316/orgs", | ||
"repos_url": "https://api.github.com/users/fv316/repos", | ||
"events_url": "https://api.github.com/users/fv316/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/fv316/received_events", | ||
"type": "User", | ||
"site_admin": false, | ||
"name": "Francisco Correia", | ||
"company": "Teya", | ||
"blog": "", | ||
"location": "Lisbon/ London", | ||
"email": null, | ||
"hireable": null, | ||
"bio": "Software developer at Teya. Electrical Engineer @ Imperial College. Data scientist @ École Polytechnique", | ||
"twitter_username": null, | ||
"public_repos": 29, | ||
"public_gists": 0, | ||
"followers": 6, | ||
"following": 5, | ||
"created_at": "2017-11-28T18:40:02Z", | ||
"updated_at": "2024-06-10T08:34:28Z" | ||
} |
66 changes: 66 additions & 0 deletions
66
...e/github/GHOrganizationTest/wiremock/testGetMembership/__files/2-orgs_hub4j-test-org.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,66 @@ | ||
{ | ||
"login": "hub4j-test-org", | ||
"id": 7544739, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", | ||
"url": "https://api.github.com/orgs/hub4j-test-org", | ||
"repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", | ||
"events_url": "https://api.github.com/orgs/hub4j-test-org/events", | ||
"hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", | ||
"issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", | ||
"members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", | ||
"public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", | ||
"description": "Hub4j Test Org Description (this could be null or blank too)", | ||
"name": "Hub4j Test Org Name (this could be null or blank too)", | ||
"company": null, | ||
"blog": "https://hub4j.url.io/could/be/null", | ||
"location": "Hub4j Test Org Location (this could be null or blank too)", | ||
"email": "hub4jtestorgemail@could.be.null.com", | ||
"twitter_username": null, | ||
"is_verified": false, | ||
"has_organization_projects": true, | ||
"has_repository_projects": true, | ||
"public_repos": 27, | ||
"public_gists": 0, | ||
"followers": 2, | ||
"following": 0, | ||
"html_url": "https://github.com/hub4j-test-org", | ||
"created_at": "2014-05-10T19:39:11Z", | ||
"updated_at": "2020-06-04T05:56:10Z", | ||
"archived_at": null, | ||
"type": "Organization", | ||
"total_private_repos": 6, | ||
"owned_private_repos": 6, | ||
"private_gists": 0, | ||
"disk_usage": 12014, | ||
"collaborators": 1, | ||
"billing_email": "kk@kohsuke.org", | ||
"default_repository_permission": "none", | ||
"members_can_create_repositories": false, | ||
"two_factor_requirement_enabled": false, | ||
"members_allowed_repository_creation_type": "none", | ||
"members_can_create_public_repositories": false, | ||
"members_can_create_private_repositories": false, | ||
"members_can_create_internal_repositories": false, | ||
"members_can_create_pages": true, | ||
"members_can_fork_private_repositories": false, | ||
"web_commit_signoff_required": false, | ||
"members_can_create_public_pages": true, | ||
"members_can_create_private_pages": true, | ||
"plan": { | ||
"name": "free", | ||
"space": 976562499, | ||
"private_repos": 10000, | ||
"filled_seats": 52, | ||
"seats": 3 | ||
}, | ||
"advanced_security_enabled_for_new_repositories": false, | ||
"dependabot_alerts_enabled_for_new_repositories": false, | ||
"dependabot_security_updates_enabled_for_new_repositories": false, | ||
"dependency_graph_enabled_for_new_repositories": false, | ||
"secret_scanning_enabled_for_new_repositories": false, | ||
"secret_scanning_push_protection_enabled_for_new_repositories": false, | ||
"secret_scanning_push_protection_custom_link_enabled": false, | ||
"secret_scanning_push_protection_custom_link": null, | ||
"secret_scanning_validity_checks_enabled": false | ||
} |
40 changes: 40 additions & 0 deletions
40
...g/kohsuke/github/GHOrganizationTest/wiremock/testGetMembership/__files/3-o_h_m_fv316.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,40 @@ | ||
{ | ||
"url": "https://api.github.com/orgs/hub4j-test-org/memberships/fv316", | ||
"state": "active", | ||
"role": "admin", | ||
"organization_url": "https://api.github.com/orgs/hub4j-test-org", | ||
"user": { | ||
"login": "fv316", | ||
"id": 34072742, | ||
"node_id": "MDQ6VXNlcjM0MDcyNzQy", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/34072742?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/fv316", | ||
"html_url": "https://github.com/fv316", | ||
"followers_url": "https://api.github.com/users/fv316/followers", | ||
"following_url": "https://api.github.com/users/fv316/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/fv316/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/fv316/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/fv316/subscriptions", | ||
"organizations_url": "https://api.github.com/users/fv316/orgs", | ||
"repos_url": "https://api.github.com/users/fv316/repos", | ||
"events_url": "https://api.github.com/users/fv316/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/fv316/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
}, | ||
"organization": { | ||
"login": "hub4j-test-org", | ||
"id": 7544739, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", | ||
"url": "https://api.github.com/orgs/hub4j-test-org", | ||
"repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", | ||
"events_url": "https://api.github.com/orgs/hub4j-test-org/events", | ||
"hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", | ||
"issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", | ||
"members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", | ||
"public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", | ||
"description": "Hub4j Test Org Description (this could be null or blank too)" | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...ces/org/kohsuke/github/GHOrganizationTest/wiremock/testGetMembership/mappings/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,50 @@ | ||
{ | ||
"id": "78c86a2e-48b0-4b78-a9c8-c409b4cc58e3", | ||
"name": "user", | ||
"request": { | ||
"url": "/user", | ||
"method": "GET", | ||
"headers": { | ||
"Accept": { | ||
"equalTo": "application/vnd.github.v3+json" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "1-user.json", | ||
"headers": { | ||
"Server": "GitHub.com", | ||
"Date": "Mon, 10 Jun 2024 09:07:17 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/\"eeffd28da9e86bf9a8b2cf03b36620ad72f1bccfccd1a5ee0a51a95dab4e05e9\"", | ||
"Last-Modified": "Mon, 10 Jun 2024 08:34:28 GMT", | ||
"github-authentication-token-expiration": "2024-06-17 10:06:09 +0100", | ||
"X-GitHub-Media-Type": "github.v3; format=json", | ||
"x-accepted-github-permissions": "allows_permissionless_access=true", | ||
"x-github-api-version-selected": "2022-11-28", | ||
"X-RateLimit-Limit": "5000", | ||
"X-RateLimit-Remaining": "4982", | ||
"X-RateLimit-Reset": "1718013850", | ||
"X-RateLimit-Used": "18", | ||
"X-RateLimit-Resource": "core", | ||
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", | ||
"Access-Control-Allow-Origin": "*", | ||
"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": "914E:19FF74:39926C:39E38C:6666C245" | ||
} | ||
}, | ||
"uuid": "78c86a2e-48b0-4b78-a9c8-c409b4cc58e3", | ||
"persistent": true, | ||
"insertionIndex": 1 | ||
} |
50 changes: 50 additions & 0 deletions
50
.../github/GHOrganizationTest/wiremock/testGetMembership/mappings/2-orgs_hub4j-test-org.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,50 @@ | ||
{ | ||
"id": "9f6e328b-67ee-4481-8bcc-8b33b990dbd2", | ||
"name": "orgs_hub4j-test-org", | ||
"request": { | ||
"url": "/orgs/hub4j-test-org", | ||
"method": "GET", | ||
"headers": { | ||
"Accept": { | ||
"equalTo": "application/vnd.github.v3+json" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "2-orgs_hub4j-test-org.json", | ||
"headers": { | ||
"Server": "GitHub.com", | ||
"Date": "Mon, 10 Jun 2024 09:07:19 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/\"67969e1a2c33b92087f1e2d76d07a944a80920a84bf07593fff4ec8c8d00f612\"", | ||
"Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", | ||
"github-authentication-token-expiration": "2024-06-17 10:06:09 +0100", | ||
"X-GitHub-Media-Type": "github.v3; format=json", | ||
"x-accepted-github-permissions": "allows_permissionless_access=true", | ||
"x-github-api-version-selected": "2022-11-28", | ||
"X-RateLimit-Limit": "5000", | ||
"X-RateLimit-Remaining": "4977", | ||
"X-RateLimit-Reset": "1718013850", | ||
"X-RateLimit-Used": "23", | ||
"X-RateLimit-Resource": "core", | ||
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset", | ||
"Access-Control-Allow-Origin": "*", | ||
"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": "56D5:19B6F6:69C4020:6A85446:6666C247" | ||
} | ||
}, | ||
"uuid": "9f6e328b-67ee-4481-8bcc-8b33b990dbd2", | ||
"persistent": true, | ||
"insertionIndex": 2 | ||
} |
Oops, something went wrong.