Skip to content

Commit

Permalink
feat: `GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{atte…
Browse files Browse the repository at this point in the history
…mpt_number}/jobs` (#372)
  • Loading branch information
octokitbot committed Oct 11, 2021
1 parent 5900697 commit 3a8fd41
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 17 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
],
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.33.0"
"@octokit/types": "^6.34.0"
},
"peerDependencies": {
"@octokit/core": ">=2"
Expand Down
20 changes: 19 additions & 1 deletion scripts/update-endpoints/generated/endpoints.json
Expand Up @@ -649,6 +649,23 @@
}
]
},
{
"url": "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
"id": "list-jobs-for-workflow-run-attempt",
"scope": "actions",
"documentationUrl": "https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt",
"renamed": null,
"responses": [
{
"code": 200,
"schema": "{\"type\":\"object\",\"required\":[\"total_count\",\"jobs\"],\"properties\":{\"total_count\":{\"type\":\"integer\"},\"jobs\":{\"type\":\"array\",\"items\":{\"title\":\"Job\",\"description\":\"Information of a job execution in a workflow run\",\"type\":\"object\",\"properties\":{\"id\":{\"description\":\"The id of the job.\",\"example\":21,\"type\":\"integer\"},\"run_id\":{\"description\":\"The id of the associated workflow run.\",\"example\":5,\"type\":\"integer\"},\"run_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/github/hello-world/actions/runs/5\"},\"run_attempt\":{\"type\":\"integer\",\"description\":\"Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run.\",\"example\":1},\"node_id\":{\"type\":\"string\",\"example\":\"MDg6Q2hlY2tSdW40\"},\"head_sha\":{\"description\":\"The SHA of the commit that is being run.\",\"example\":\"009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d\",\"type\":\"string\"},\"url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/github/hello-world/actions/jobs/21\"},\"html_url\":{\"type\":\"string\",\"example\":\"https://github.com/github/hello-world/runs/4\",\"nullable\":true},\"status\":{\"description\":\"The phase of the lifecycle that the job is currently in.\",\"example\":\"queued\",\"type\":\"string\",\"enum\":[\"queued\",\"in_progress\",\"completed\"]},\"conclusion\":{\"description\":\"The outcome of the job.\",\"example\":\"success\",\"type\":\"string\",\"nullable\":true},\"started_at\":{\"description\":\"The time that the job started, in ISO 8601 format.\",\"example\":\"2019-08-08T08:00:00-07:00\",\"format\":\"date-time\",\"type\":\"string\"},\"completed_at\":{\"description\":\"The time that the job finished, in ISO 8601 format.\",\"example\":\"2019-08-08T08:00:00-07:00\",\"format\":\"date-time\",\"type\":\"string\",\"nullable\":true},\"name\":{\"description\":\"The name of the job.\",\"example\":\"test-coverage\",\"type\":\"string\"},\"steps\":{\"description\":\"Steps in this job.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"required\":[\"name\",\"status\",\"conclusion\",\"number\"],\"properties\":{\"status\":{\"description\":\"The phase of the lifecycle that the job is currently in.\",\"example\":\"queued\",\"type\":\"string\",\"enum\":[\"queued\",\"in_progress\",\"completed\"]},\"conclusion\":{\"description\":\"The outcome of the job.\",\"example\":\"success\",\"type\":\"string\",\"nullable\":true},\"name\":{\"description\":\"The name of the job.\",\"example\":\"test-coverage\",\"type\":\"string\"},\"number\":{\"type\":\"integer\",\"example\":1},\"started_at\":{\"description\":\"The time that the step started, in ISO 8601 format.\",\"example\":\"2019-08-08T08:00:00-07:00\",\"format\":\"date-time\",\"type\":\"string\",\"nullable\":true},\"completed_at\":{\"description\":\"The time that the job finished, in ISO 8601 format.\",\"example\":\"2019-08-08T08:00:00-07:00\",\"format\":\"date-time\",\"type\":\"string\",\"nullable\":true}}}},\"check_run_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/repos/github/hello-world/check-runs/4\"},\"labels\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"Labels for the workflow job. Specified by the \\\"runs_on\\\" attribute in the action's workflow file.\",\"example\":[\"self-hosted\",\"foo\",\"bar\"]},\"runner_id\":{\"type\":\"integer\",\"nullable\":true,\"example\":1,\"description\":\"The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)\"},\"runner_name\":{\"type\":\"string\",\"nullable\":true,\"example\":\"my runner\",\"description\":\"The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)\"},\"runner_group_id\":{\"type\":\"integer\",\"nullable\":true,\"example\":2,\"description\":\"The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)\"},\"runner_group_name\":{\"type\":\"string\",\"nullable\":true,\"example\":\"my runner group\",\"description\":\"The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)\"}},\"required\":[\"id\",\"node_id\",\"run_id\",\"run_url\",\"head_sha\",\"name\",\"url\",\"html_url\",\"status\",\"conclusion\",\"started_at\",\"completed_at\",\"check_run_url\",\"labels\",\"runner_id\",\"runner_name\",\"runner_group_id\",\"runner_group_name\"]}}}}"
},
{
"code": 404,
"schema": "{\"title\":\"Basic Error\",\"description\":\"Basic Error\",\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}"
}
]
},
{
"url": "/orgs/{org}/actions/secrets",
"id": "list-org-secrets",
Expand Down Expand Up @@ -11328,7 +11345,8 @@
{
"code": 201,
"schema": "{\"title\":\"Release Asset\",\"description\":\"Data related to a release.\",\"type\":\"object\",\"properties\":{\"url\":{\"type\":\"string\",\"format\":\"uri\"},\"browser_download_url\":{\"type\":\"string\",\"format\":\"uri\"},\"id\":{\"type\":\"integer\"},\"node_id\":{\"type\":\"string\"},\"name\":{\"description\":\"The file name of the asset.\",\"type\":\"string\",\"example\":\"Team Environment\"},\"label\":{\"type\":\"string\",\"nullable\":true},\"state\":{\"description\":\"State of the release asset.\",\"type\":\"string\",\"enum\":[\"uploaded\",\"open\"]},\"content_type\":{\"type\":\"string\"},\"size\":{\"type\":\"integer\"},\"download_count\":{\"type\":\"integer\"},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"uploader\":{\"title\":\"Simple User\",\"description\":\"Simple User\",\"type\":\"object\",\"properties\":{\"name\":{\"nullable\":true,\"type\":\"string\"},\"email\":{\"nullable\":true,\"type\":\"string\"},\"login\":{\"type\":\"string\",\"example\":\"octocat\"},\"id\":{\"type\":\"integer\",\"example\":1},\"node_id\":{\"type\":\"string\",\"example\":\"MDQ6VXNlcjE=\"},\"avatar_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/images/error/octocat_happy.gif\"},\"gravatar_id\":{\"type\":\"string\",\"example\":\"41d064eb2195891e12d0413f63227ea7\",\"nullable\":true},\"url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat\"},\"html_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://github.com/octocat\"},\"followers_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/followers\"},\"following_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/following{/other_user}\"},\"gists_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/gists{/gist_id}\"},\"starred_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\"},\"subscriptions_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/subscriptions\"},\"organizations_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/orgs\"},\"repos_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/repos\"},\"events_url\":{\"type\":\"string\",\"example\":\"https://api.github.com/users/octocat/events{/privacy}\"},\"received_events_url\":{\"type\":\"string\",\"format\":\"uri\",\"example\":\"https://api.github.com/users/octocat/received_events\"},\"type\":{\"type\":\"string\",\"example\":\"User\"},\"site_admin\":{\"type\":\"boolean\"},\"starred_at\":{\"type\":\"string\",\"example\":\"\\\"2020-07-09T00:17:55Z\\\"\"}},\"required\":[\"avatar_url\",\"events_url\",\"followers_url\",\"following_url\",\"gists_url\",\"gravatar_id\",\"html_url\",\"id\",\"node_id\",\"login\",\"organizations_url\",\"received_events_url\",\"repos_url\",\"site_admin\",\"starred_url\",\"subscriptions_url\",\"type\",\"url\"],\"nullable\":true}},\"required\":[\"id\",\"name\",\"content_type\",\"size\",\"state\",\"url\",\"node_id\",\"download_count\",\"label\",\"uploader\",\"browser_download_url\",\"created_at\",\"updated_at\"]}"
}
},
{ "code": 422, "schema": null }
]
},
{
Expand Down
11 changes: 11 additions & 0 deletions src/generated/paginating-endpoints.ts
Expand Up @@ -625,6 +625,16 @@ export interface PaginatingEndpoints {
};
};

/**
* @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt
*/
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": {
parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"] & {
data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]["data"]["jobs"];
};
};

/**
* @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run
*/
Expand Down Expand Up @@ -1736,6 +1746,7 @@ export const paginatingEndpoints: (keyof PaginatingEndpoints)[] = [
"GET /repos/{owner}/{repo}/actions/runners/downloads",
"GET /repos/{owner}/{repo}/actions/runs",
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs",
"GET /repos/{owner}/{repo}/actions/secrets",
"GET /repos/{owner}/{repo}/actions/workflows",
Expand Down

0 comments on commit 3a8fd41

Please sign in to comment.