-
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.
Be a lot more flexible as for GHMemberChanges values
Unfortunately, things are not consistent between added and edited. added provide a permission of some sort and a role name (sometimes...) edited only provides permission and it's not exactly the same ones For now, I think we need to return strings to avoid issues until GitHub adjusts the API.
- Loading branch information
Showing
4 changed files
with
261 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
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
169 changes: 169 additions & 0 deletions
169
src/test/resources/org/kohsuke/github/GHEventPayloadTest/member_added_role_name.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,169 @@ | ||
{ | ||
"action": "added", | ||
"member": { | ||
"login": "yrodiere", | ||
"id": 412878, | ||
"node_id": "MDQ6VXNlcjQxMjg3OA==", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/yrodiere", | ||
"html_url": "https://github.com/yrodiere", | ||
"followers_url": "https://api.github.com/users/yrodiere/followers", | ||
"following_url": "https://api.github.com/users/yrodiere/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", | ||
"organizations_url": "https://api.github.com/users/yrodiere/orgs", | ||
"repos_url": "https://api.github.com/users/yrodiere/repos", | ||
"events_url": "https://api.github.com/users/yrodiere/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/yrodiere/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
}, | ||
"changes": { "permission": { "to": "write" }, "role_name": { "to": "maintain" } }, | ||
"repository": { | ||
"id": 493568123, | ||
"node_id": "R_kgDOHWtAew", | ||
"name": "github-automation-with-quarkus-demo-playground", | ||
"full_name": "gsmet-bot-playground/github-automation-with-quarkus-demo-playground", | ||
"private": false, | ||
"owner": { | ||
"login": "gsmet-bot-playground", | ||
"id": 81260024, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjgxMjYwMDI0", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/81260024?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/gsmet-bot-playground", | ||
"html_url": "https://github.com/gsmet-bot-playground", | ||
"followers_url": "https://api.github.com/users/gsmet-bot-playground/followers", | ||
"following_url": "https://api.github.com/users/gsmet-bot-playground/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/gsmet-bot-playground/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/gsmet-bot-playground/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/gsmet-bot-playground/subscriptions", | ||
"organizations_url": "https://api.github.com/users/gsmet-bot-playground/orgs", | ||
"repos_url": "https://api.github.com/users/gsmet-bot-playground/repos", | ||
"events_url": "https://api.github.com/users/gsmet-bot-playground/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/gsmet-bot-playground/received_events", | ||
"type": "Organization", | ||
"site_admin": false | ||
}, | ||
"html_url": "https://github.com/gsmet-bot-playground/github-automation-with-quarkus-demo-playground", | ||
"description": "Example repository with a demo GitHub app (github-automation-with-quarkus-demo-app) installed", | ||
"fork": false, | ||
"url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground", | ||
"forks_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/forks", | ||
"keys_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/keys{/key_id}", | ||
"collaborators_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/collaborators{/collaborator}", | ||
"teams_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/teams", | ||
"hooks_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/hooks", | ||
"issue_events_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/issues/events{/number}", | ||
"events_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/events", | ||
"assignees_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/assignees{/user}", | ||
"branches_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/branches{/branch}", | ||
"tags_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/tags", | ||
"blobs_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/git/blobs{/sha}", | ||
"git_tags_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/git/tags{/sha}", | ||
"git_refs_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/git/refs{/sha}", | ||
"trees_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/git/trees{/sha}", | ||
"statuses_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/statuses/{sha}", | ||
"languages_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/languages", | ||
"stargazers_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/stargazers", | ||
"contributors_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/contributors", | ||
"subscribers_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/subscribers", | ||
"subscription_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/subscription", | ||
"commits_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/commits{/sha}", | ||
"git_commits_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/git/commits{/sha}", | ||
"comments_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/comments{/number}", | ||
"issue_comment_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/issues/comments{/number}", | ||
"contents_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/contents/{+path}", | ||
"compare_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/compare/{base}...{head}", | ||
"merges_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/merges", | ||
"archive_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/{archive_format}{/ref}", | ||
"downloads_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/downloads", | ||
"issues_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/issues{/number}", | ||
"pulls_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/pulls{/number}", | ||
"milestones_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/milestones{/number}", | ||
"notifications_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/notifications{?since,all,participating}", | ||
"labels_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/labels{/name}", | ||
"releases_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/releases{/id}", | ||
"deployments_url": "https://api.github.com/repos/gsmet-bot-playground/github-automation-with-quarkus-demo-playground/deployments", | ||
"created_at": "2022-05-18T08:07:30Z", | ||
"updated_at": "2022-05-19T10:46:46Z", | ||
"pushed_at": "2023-07-07T08:22:15Z", | ||
"git_url": "git://github.com/gsmet-bot-playground/github-automation-with-quarkus-demo-playground.git", | ||
"ssh_url": "git@github.com:gsmet-bot-playground/github-automation-with-quarkus-demo-playground.git", | ||
"clone_url": "https://github.com/gsmet-bot-playground/github-automation-with-quarkus-demo-playground.git", | ||
"svn_url": "https://github.com/gsmet-bot-playground/github-automation-with-quarkus-demo-playground", | ||
"homepage": null, | ||
"size": 5, | ||
"stargazers_count": 0, | ||
"watchers_count": 0, | ||
"language": null, | ||
"has_issues": true, | ||
"has_projects": true, | ||
"has_downloads": true, | ||
"has_wiki": true, | ||
"has_pages": false, | ||
"has_discussions": false, | ||
"forks_count": 0, | ||
"mirror_url": null, | ||
"archived": false, | ||
"disabled": false, | ||
"open_issues_count": 0, | ||
"license": { | ||
"key": "apache-2.0", | ||
"name": "Apache License 2.0", | ||
"spdx_id": "Apache-2.0", | ||
"url": "https://api.github.com/licenses/apache-2.0", | ||
"node_id": "MDc6TGljZW5zZTI=" | ||
}, | ||
"allow_forking": true, | ||
"is_template": false, | ||
"web_commit_signoff_required": false, | ||
"topics": [], | ||
"visibility": "public", | ||
"forks": 0, | ||
"open_issues": 0, | ||
"watchers": 0, | ||
"default_branch": "main", | ||
"custom_properties": {} | ||
}, | ||
"organization": { | ||
"login": "gsmet-bot-playground", | ||
"id": 81260024, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjgxMjYwMDI0", | ||
"url": "https://api.github.com/orgs/gsmet-bot-playground", | ||
"repos_url": "https://api.github.com/orgs/gsmet-bot-playground/repos", | ||
"events_url": "https://api.github.com/orgs/gsmet-bot-playground/events", | ||
"hooks_url": "https://api.github.com/orgs/gsmet-bot-playground/hooks", | ||
"issues_url": "https://api.github.com/orgs/gsmet-bot-playground/issues", | ||
"members_url": "https://api.github.com/orgs/gsmet-bot-playground/members{/member}", | ||
"public_members_url": "https://api.github.com/orgs/gsmet-bot-playground/public_members{/member}", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/81260024?v=4", | ||
"description": null | ||
}, | ||
"sender": { | ||
"login": "gsmet", | ||
"id": 1279749, | ||
"node_id": "MDQ6VXNlcjEyNzk3NDk=", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/1279749?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/gsmet", | ||
"html_url": "https://github.com/gsmet", | ||
"followers_url": "https://api.github.com/users/gsmet/followers", | ||
"following_url": "https://api.github.com/users/gsmet/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/gsmet/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/gsmet/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/gsmet/subscriptions", | ||
"organizations_url": "https://api.github.com/users/gsmet/orgs", | ||
"repos_url": "https://api.github.com/users/gsmet/repos", | ||
"events_url": "https://api.github.com/users/gsmet/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/gsmet/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
}, | ||
"installation": { | ||
"id": 16779846, | ||
"node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMTY3Nzk4NDY=" | ||
} | ||
} |