-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `new_permissions_accepted` events can now be deserialized even if they do not have the `repositories` field like the other actions of this webhook event type. - when the fully hydrated installation object is contained in a webhook event, octocrab now gives access to the `created_at` and `updated_at` timestamps related to the installation. This commit also mentions in the doc-string of Installation::events that at least in the webhook events case, it should be expected to have values matching the string versions of `octocrab::models::webhook_events::WebhookEventType` variants Fixes #444
- Loading branch information
1 parent
48c95a0
commit bcddbad
Showing
4 changed files
with
134 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
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
82 changes: 82 additions & 0 deletions
82
tests/resources/installation_new_permissions_accepted_webhook_event.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,82 @@ | ||
{ | ||
"action": "new_permissions_accepted", | ||
"installation": { | ||
"id": 88888888, | ||
"account": { | ||
"login": "gagbo", | ||
"id": 10496163, | ||
"node_id": "MDQ6VXNlcjEwNDk2MTYz", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/10496163?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/gagbo", | ||
"html_url": "https://github.com/gagbo", | ||
"followers_url": "https://api.github.com/users/gagbo/followers", | ||
"following_url": "https://api.github.com/users/gagbo/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/gagbo/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/gagbo/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/gagbo/subscriptions", | ||
"organizations_url": "https://api.github.com/users/gagbo/orgs", | ||
"repos_url": "https://api.github.com/users/gagbo/repos", | ||
"events_url": "https://api.github.com/users/gagbo/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/gagbo/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
}, | ||
"repository_selection": "all", | ||
"access_tokens_url": "https://api.github.com/app/installations/88888888/access_tokens", | ||
"repositories_url": "https://api.github.com/installation/repositories", | ||
"html_url": "https://github.com/settings/installations/88888888", | ||
"app_id": 7777777, | ||
"app_slug": "gagbo-test-app", | ||
"target_id": 10496163, | ||
"target_type": "User", | ||
"permissions": { | ||
"issues": "write", | ||
"actions": "write", | ||
"contents": "read", | ||
"metadata": "read", | ||
"pull_requests": "write" | ||
}, | ||
"events": [ | ||
"create", | ||
"delete", | ||
"fork", | ||
"issues", | ||
"issue_comment", | ||
"pull_request", | ||
"pull_request_review", | ||
"pull_request_review_comment", | ||
"pull_request_review_thread", | ||
"push", | ||
"release", | ||
"repository" | ||
], | ||
"created_at": "2023-07-13T11:35:31.000+02:00", | ||
"updated_at": "2023-08-18T15:28:04.000+02:00", | ||
"single_file_name": null, | ||
"has_multiple_single_files": false, | ||
"single_file_paths": [], | ||
"suspended_by": null, | ||
"suspended_at": null | ||
}, | ||
"sender": { | ||
"login": "gagbo", | ||
"id": 10496163, | ||
"node_id": "MDQ6VXNlcjEwNDk2MTYz", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/10496163?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/gagbo", | ||
"html_url": "https://github.com/gagbo", | ||
"followers_url": "https://api.github.com/users/gagbo/followers", | ||
"following_url": "https://api.github.com/users/gagbo/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/gagbo/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/gagbo/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/gagbo/subscriptions", | ||
"organizations_url": "https://api.github.com/users/gagbo/orgs", | ||
"repos_url": "https://api.github.com/users/gagbo/repos", | ||
"events_url": "https://api.github.com/users/gagbo/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/gagbo/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
} | ||
} |