* Use in_progress workflow_job example, not queued ### tl;dr This changes the example `workflow_job` payload to be an `in_progress` event instead of `queued` event. ### why In #22174, I added some keys to the example workflow_job json. This was correct, but by adding non-null _values_, **I introduced a subtle bug**. It's a bug because a `queued` workflow is—by definition—_not_ yet assigned to a runner. So all the `runner_*` attributes will be `null` in the real world. After the workflow becomes `in_progress`, all the values are guaranteed to exist. So let's change the example to be an `in_progress` event, since it's a better example for documentation. * Explain more about the runner_* attributes in "workflow_job_properties.md" * Consistentize naming Co-authored-by: Martin Lopes <martin389@github.com> Co-authored-by: hubwriter <hubwriter@github.com>
166 lines
8.5 KiB
JSON
166 lines
8.5 KiB
JSON
{
|
|
"action": "in_progress",
|
|
"workflow_job": {
|
|
"id": 2832853555,
|
|
"run_id": 940463255,
|
|
"run_url": "https://api.github.com/repos/octo-org/example-workflow/actions/runs/940463255",
|
|
"node_id": "MDg6Q2hlY2tSdW4yODMyODUzNT55",
|
|
"head_sha": "e3103f8eb03e1ad7f2331c5446b23c070fc54055",
|
|
"url": "https://api.github.com/repos/octo-org/example-workflow/actions/jobs/2832853555",
|
|
"html_url": "https://github.com/octo-org/example-workflow/runs/2832853555",
|
|
"status": "in_progress",
|
|
"conclusion": null,
|
|
"started_at": "2021-06-15T19:22:27Z",
|
|
"completed_at": null,
|
|
"name": "Test workflow",
|
|
"steps": [
|
|
{
|
|
"name": "Set up job",
|
|
"status": "in_progress",
|
|
"conclusion": null,
|
|
"number": 1,
|
|
"started_at": "2021-06-15T19:22:27.000Z",
|
|
"completed_at": null
|
|
}
|
|
],
|
|
"check_run_url": "https://api.github.com/repos/octo-org/example-workflow/check-runs/2832853555",
|
|
"labels": [
|
|
"gpu",
|
|
"db-app",
|
|
"dc-03"
|
|
],
|
|
"runner_id": 1,
|
|
"runner_name": "my runner",
|
|
"runner_group_id": 2,
|
|
"runner_group_name": "my runner group"
|
|
},
|
|
"repository": {
|
|
"id": 376034443,
|
|
"node_id": "MDEwOlJlcG9zaXRvcnkzNzYwMzQ0ND55",
|
|
"name": "example-workflow",
|
|
"full_name": "octo-org/example-workflow",
|
|
"private": true,
|
|
"owner": {
|
|
"login": "octo-org",
|
|
"id": 33435655,
|
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjMzNDM1Nj55",
|
|
"avatar_url": "https://avatars.githubusercontent.com/u/21031067?s=460&u=d851e01410b4f1674f000ba7e0dc94e0b82cd9cc&v=4",
|
|
"gravatar_id": "",
|
|
"url": "https://api.github.com/users/octo-org",
|
|
"html_url": "https://github.com/octo-org",
|
|
"followers_url": "https://api.github.com/users/octo-org/followers",
|
|
"following_url": "https://api.github.com/users/octo-org/following{/other_user}",
|
|
"gists_url": "https://api.github.com/users/octo-org/gists{/gist_id}",
|
|
"starred_url": "https://api.github.com/users/octo-org/starred{/owner}{/repo}",
|
|
"subscriptions_url": "https://api.github.com/users/octo-org/subscriptions",
|
|
"organizations_url": "https://api.github.com/users/octo-org/orgs",
|
|
"repos_url": "https://api.github.com/users/octo-org/repos",
|
|
"events_url": "https://api.github.com/users/octo-org/events{/privacy}",
|
|
"received_events_url": "https://api.github.com/users/octo-org/received_events",
|
|
"type": "Organization",
|
|
"site_admin": false
|
|
},
|
|
"html_url": "https://github.com/octo-org/example-workflow",
|
|
"description": "Test workflow",
|
|
"fork": false,
|
|
"url": "https://api.github.com/repos/octo-org/example-workflow",
|
|
"forks_url": "https://api.github.com/repos/octo-org/example-workflow/forks",
|
|
"keys_url": "https://api.github.com/repos/octo-org/example-workflow/keys{/key_id}",
|
|
"collaborators_url": "https://api.github.com/repos/octo-org/example-workflow/collaborators{/collaborator}",
|
|
"teams_url": "https://api.github.com/repos/octo-org/example-workflow/teams",
|
|
"hooks_url": "https://api.github.com/repos/octo-org/example-workflow/hooks",
|
|
"issue_events_url": "https://api.github.com/repos/octo-org/example-workflow/issues/events{/number}",
|
|
"events_url": "https://api.github.com/repos/octo-org/example-workflow/events",
|
|
"assignees_url": "https://api.github.com/repos/octo-org/example-workflow/assignees{/user}",
|
|
"branches_url": "https://api.github.com/repos/octo-org/example-workflow/branches{/branch}",
|
|
"tags_url": "https://api.github.com/repos/octo-org/example-workflow/tags",
|
|
"blobs_url": "https://api.github.com/repos/octo-org/example-workflow/git/blobs{/sha}",
|
|
"git_tags_url": "https://api.github.com/repos/octo-org/example-workflow/git/tags{/sha}",
|
|
"git_refs_url": "https://api.github.com/repos/octo-org/example-workflow/git/refs{/sha}",
|
|
"trees_url": "https://api.github.com/repos/octo-org/example-workflow/git/trees{/sha}",
|
|
"statuses_url": "https://api.github.com/repos/octo-org/example-workflow/statuses/{sha}",
|
|
"languages_url": "https://api.github.com/repos/octo-org/example-workflow/languages",
|
|
"stargazers_url": "https://api.github.com/repos/octo-org/example-workflow/stargazers",
|
|
"contributors_url": "https://api.github.com/repos/octo-org/example-workflow/contributors",
|
|
"subscribers_url": "https://api.github.com/repos/octo-org/example-workflow/subscribers",
|
|
"subscription_url": "https://api.github.com/repos/octo-org/example-workflow/subscription",
|
|
"commits_url": "https://api.github.com/repos/octo-org/example-workflow/commits{/sha}",
|
|
"git_commits_url": "https://api.github.com/repos/octo-org/example-workflow/git/commits{/sha}",
|
|
"comments_url": "https://api.github.com/repos/octo-org/example-workflow/comments{/number}",
|
|
"issue_comment_url": "https://api.github.com/repos/octo-org/example-workflow/issues/comments{/number}",
|
|
"contents_url": "https://api.github.com/repos/octo-org/example-workflow/contents/{+path}",
|
|
"compare_url": "https://api.github.com/repos/octo-org/example-workflow/compare/{base}...{head}",
|
|
"merges_url": "https://api.github.com/repos/octo-org/example-workflow/merges",
|
|
"archive_url": "https://api.github.com/repos/octo-org/example-workflow/{archive_format}{/ref}",
|
|
"downloads_url": "https://api.github.com/repos/octo-org/example-workflow/downloads",
|
|
"issues_url": "https://api.github.com/repos/octo-org/example-workflow/issues{/number}",
|
|
"pulls_url": "https://api.github.com/repos/octo-org/example-workflow/pulls{/number}",
|
|
"milestones_url": "https://api.github.com/repos/octo-org/example-workflow/milestones{/number}",
|
|
"notifications_url": "https://api.github.com/repos/octo-org/example-workflow/notifications{?since,all,participating}",
|
|
"labels_url": "https://api.github.com/repos/octo-org/example-workflow/labels{/name}",
|
|
"releases_url": "https://api.github.com/repos/octo-org/example-workflow/releases{/id}",
|
|
"deployments_url": "https://api.github.com/repos/octo-org/example-workflow/deployments",
|
|
"created_at": "2021-06-11T13:29:13Z",
|
|
"updated_at": "2021-06-11T13:33:01Z",
|
|
"pushed_at": "2021-06-11T13:32:58Z",
|
|
"git_url": "git://github.com/octo-org/example-workflow.git",
|
|
"ssh_url": "git@github.com:octo-org/example-workflow.git",
|
|
"clone_url": "https://github.com/octo-org/example-workflow.git",
|
|
"svn_url": "https://github.com/octo-org/example-workflow",
|
|
"homepage": null,
|
|
"size": 1,
|
|
"stargazers_count": 0,
|
|
"watchers_count": 0,
|
|
"language": null,
|
|
"has_issues": true,
|
|
"has_projects": true,
|
|
"has_downloads": true,
|
|
"has_wiki": true,
|
|
"has_pages": false,
|
|
"forks_count": 0,
|
|
"mirror_url": null,
|
|
"archived": false,
|
|
"disabled": false,
|
|
"open_issues_count": 0,
|
|
"license": null,
|
|
"forks": 0,
|
|
"open_issues": 0,
|
|
"watchers": 0,
|
|
"default_branch": "main"
|
|
},
|
|
"organization": {
|
|
"login": "octo-org",
|
|
"id": 33435655,
|
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjMzNDM1Nj55",
|
|
"url": "https://api.github.com/orgs/octo-org",
|
|
"repos_url": "https://api.github.com/orgs/octo-org/repos",
|
|
"events_url": "https://api.github.com/orgs/octo-org/events",
|
|
"hooks_url": "https://api.github.com/orgs/octo-org/hooks",
|
|
"issues_url": "https://api.github.com/orgs/octo-org/issues",
|
|
"members_url": "https://api.github.com/orgs/octo-org/members{/member}",
|
|
"public_members_url": "https://api.github.com/orgs/octo-org/public_members{/member}",
|
|
"avatar_url": "https://avatars.githubusercontent.com/u/21031067?s=460&u=d851e01410b4f1674f000ba7e0dc94e0b82cd9cc&v=4",
|
|
"description": "octo-org"
|
|
},
|
|
"sender": {
|
|
"login": "octocat",
|
|
"id": 319655,
|
|
"node_id": "MDQ6VXNlcjMxOTY1NQ55",
|
|
"avatar_url": "https://avatars.githubusercontent.com/u/21031067?s=460&u=d851e01410b4f1674f000ba7e0dc94e0b82cd9cc&v=4",
|
|
"gravatar_id": "",
|
|
"url": "https://api.github.com/users/octocat",
|
|
"html_url": "https://github.com/octocat",
|
|
"followers_url": "https://api.github.com/users/octocat/followers",
|
|
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
|
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
|
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
|
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
|
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
|
"repos_url": "https://api.github.com/users/octocat/repos",
|
|
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
|
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
|
"type": "User",
|
|
"site_admin": true
|
|
}
|
|
}
|