-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add waiting deployment status state #52
fix: add waiting deployment status state #52
Conversation
Adds the `waiting` value to the `DeploymentStatusState` enumeration.
Adds the `waiting` value to the `CheckRunStatus` enumeration.
Adds the `waiting` value to the `WorkflowRunStatus` enumeration.
Can I just confirm did you see the I know the API can be a little out of sync, but things are set to improve in the near future1 Footnotes |
Yeah, sorry for not being explicit, I did actually get those values. I fixed the first one based on the exception I got in my app, and then later on I tried to deserialise the webhook again after incorporating the fix and ran into the second enum value missing. Then rinse and repeat with the third enum+commit, at which point I could successfully deserialise the payload into the event. |
Here are the relevant bits of the payload: deployment_status{
"deployment_status": {
"url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/deployments/534555140/statuses/962858309",
"id": 962858309,
"node_id": "DES_kwDOC2Wnd845ZA1F",
"state": "waiting",
"creator": {
"login": "martincostello",
"id": 1439341,
"node_id": "MDQ6VXNlcjE0MzkzNDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1439341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martincostello",
"html_url": "https://github.com/martincostello",
"followers_url": "https://api.github.com/users/martincostello/followers",
"following_url": "https://api.github.com/users/martincostello/following{/other_user}",
"gists_url": "https://api.github.com/users/martincostello/gists{/gist_id}",
"starred_url": "https://api.github.com/users/martincostello/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martincostello/subscriptions",
"organizations_url": "https://api.github.com/users/martincostello/orgs",
"repos_url": "https://api.github.com/users/martincostello/repos",
"events_url": "https://api.github.com/users/martincostello/events{/privacy}",
"received_events_url": "https://api.github.com/users/martincostello/received_events",
"type": "User",
"site_admin": false
},
"description": "",
"environment": "production",
"target_url": "https://github.com/martincostello/SignInWithAppleSample/runs/5717998026?check_suite_focus=true",
"created_at": "2022-03-28T09:51:28Z",
"updated_at": "2022-03-28T09:51:28Z",
"deployment_url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/deployments/534555140",
"repository_url": "https://api.github.com/repos/martincostello/SignInWithAppleSample",
"environment_url": "",
"log_url": "https://github.com/martincostello/SignInWithAppleSample/runs/5717998026?check_suite_focus=true",
"performed_via_github_app": null
},
"deployment": {
"url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/deployments/534555140",
"id": 534895272,
"node_id": "DE_kwDOC2Wnd84f3KoE",
"task": "deploy",
"original_environment": "production",
"environment": "production",
"description": null,
"created_at": "2022-03-28T09:51:25Z",
"updated_at": "2022-03-28T09:51:28Z",
"statuses_url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/deployments/534555140/statuses",
"repository_url": "https://api.github.com/repos/martincostello/SignInWithAppleSample",
"creator": {
"login": "martincostello",
"id": 1439341,
"node_id": "MDQ6VXNlcjE0MzkzNDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1439341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martincostello",
"html_url": "https://github.com/martincostello",
"followers_url": "https://api.github.com/users/martincostello/followers",
"following_url": "https://api.github.com/users/martincostello/following{/other_user}",
"gists_url": "https://api.github.com/users/martincostello/gists{/gist_id}",
"starred_url": "https://api.github.com/users/martincostello/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martincostello/subscriptions",
"organizations_url": "https://api.github.com/users/martincostello/orgs",
"repos_url": "https://api.github.com/users/martincostello/repos",
"events_url": "https://api.github.com/users/martincostello/events{/privacy}",
"received_events_url": "https://api.github.com/users/martincostello/received_events",
"type": "User",
"site_admin": false
},
"sha": "e5c7c92cd83003979af080b811a0c3ab28fbc859",
"ref": "main",
"payload": {
},
"transient_environment": false,
"production_environment": false,
"performed_via_github_app": null
},
"check_run": {
"id": 5717998026,
"name": "deploy-production",
"node_id": "CR_kwDOC2Wnd88AAAABVNG5yg",
"head_sha": "e5c7c92cd83003979af080b811a0c3ab28fbc859",
"external_id": "e07742bd-189a-5079-918b-43f8b2f94b89",
"url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/check-runs/5717998026",
"html_url": "https://github.com/martincostello/SignInWithAppleSample/runs/5717998026?check_suite_focus=true",
"details_url": "https://github.com/martincostello/SignInWithAppleSample/runs/5717998026?check_suite_focus=true",
"status": "waiting",
"conclusion": null,
"started_at": "2022-03-28T09:51:24Z",
"completed_at": null
},
"workflow": {
"id": 882579,
"node_id": "MDg6V29ya2Zsb3c4ODI1Nzk=",
"name": "build",
"path": ".github/workflows/build.yml",
"state": "active",
"created_at": "2020-03-28T17:33:32.000Z",
"updated_at": "2020-03-28T17:33:32.000Z",
"url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/actions/workflows/882579",
"html_url": "https://github.com/martincostello/SignInWithAppleSample/blob/main/.github/workflows/build.yml",
"badge_url": "https://github.com/martincostello/SignInWithAppleSample/workflows/build/badge.svg"
},
"workflow_run": {
"id": 2053875102,
"name": "build",
"node_id": "WFR_kwLOC2Wnd856RyIc",
"head_branch": "main",
"head_sha": "e5c7c92cd83003979af080b811a0c3ab28fbc859",
"run_number": 341,
"event": "workflow_dispatch",
"status": "waiting",
"conclusion": null,
"workflow_id": 882579,
"check_suite_id": 5825661931,
"check_suite_node_id": "CS_kwDOC2Wnd88AAAABWzyL6w",
"url": "https://api.github.com/repos/martincostello/SignInWithAppleSample/actions/runs/2051482140",
"html_url": "https://github.com/martincostello/SignInWithAppleSample/actions/runs/2051482140",
"pull_requests": [
],
"created_at": "2022-03-28T09:48:06Z",
"updated_at": "2022-03-28T09:51:28Z",
"actor": {
"login": "martincostello",
"id": 1439341,
"node_id": "MDQ6VXNlcjE0MzkzNDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1439341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martincostello",
"html_url": "https://github.com/martincostello",
"followers_url": "https://api.github.com/users/martincostello/followers",
"following_url": "https://api.github.com/users/martincostello/following{/other_user}",
"gists_url": "https://api.github.com/users/martincostello/gists{/gist_id}",
"starred_url": "https://api.github.com/users/martincostello/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martincostello/subscriptions",
"organizations_url": "https://api.github.com/users/martincostello/orgs",
"repos_url": "https://api.github.com/users/martincostello/repos",
"events_url": "https://api.github.com/users/martincostello/events{/privacy}",
"received_events_url": "https://api.github.com/users/martincostello/received_events",
"type": "User",
"site_admin": false
},
"run_attempt": 1,
"run_started_at": "2022-03-28T09:48:06Z",
"triggering_actor": {
"login": "martincostello",
"id": 1439341,
"node_id": "MDQ6VXNlcjE0MzkzNDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1439341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martincostello",
"html_url": "https://github.com/martincostello",
"followers_url": "https://api.github.com/users/martincostello/followers",
"following_url": "https://api.github.com/users/martincostello/following{/other_user}",
"gists_url": "https://api.github.com/users/martincostello/gists{/gist_id}",
"starred_url": "https://api.github.com/users/martincostello/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martincostello/subscriptions",
"organizations_url": "https://api.github.com/users/martincostello/orgs",
"repos_url": "https://api.github.com/users/martincostello/repos",
"events_url": "https://api.github.com/users/martincostello/events{/privacy}",
"received_events_url": "https://api.github.com/users/martincostello/received_events",
"type": "User",
"site_admin": false
}
},
"action": "created"
} |
Thanks for the confirmation. Let's get this merged! |
…kflow_run` event Ref: octokit/webhooks.net#52
* fix: add `waiting` state to `deployment_status`, `check_run` and `workflow_run` event Ref: octokit/webhooks.net#52 * fix: add `skipped` to `workflow_run` conclusion Ref: octokit/webhooks.net#57 * fix: update the `pull_request` property description on `check_run` event * feat: add `pull_request_review_thread` examples, The event was recently added to the docs * feat(GHES): new event: `package` * feat(GHES): new `pull_request_review_thread` event * fix(GHES): event description updates * feat(GHAE): new `pull_request_review_thread` event * fix(GHAE): description updates * feat: remove `secret_scanning_alert` from `index.json` Co-authored-by: Octokit Bot <octokitbot@martynus.net> Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
Adds the
waiting
value to theCheckRunStatus
,DeploymentStatusState
, andWorkflowRunStatus
enumerations.Here's an example of the relevant part a webhook payload I received that had this status:
deployment_status payload
It looks like the schema in the webhooks repo and the docs are out of sync with the values that users can actually receive as they're missing both
in_progress
andwaiting
.