Skip to content

Commit 53e3403

Browse files
feat: octokit.actions.deleteWorkflowRunLogs() (#68)
Co-authored-by: Octokit Bot <[email protected]>
1 parent 307c160 commit 53e3403

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Delete workflow run logs
2+
3+
Deletes all logs for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.
4+
5+
```js
6+
octokit.actions.deleteWorkflowRunLogs({
7+
owner,
8+
repo,
9+
run_id,
10+
});
11+
```
12+
13+
## Parameters
14+
15+
<table>
16+
<thead>
17+
<tr>
18+
<th>name</th>
19+
<th>required</th>
20+
<th>description</th>
21+
</tr>
22+
</thead>
23+
<tbody>
24+
<tr><td>owner</td><td>yes</td><td>
25+
26+
owner parameter
27+
28+
</td></tr>
29+
<tr><td>repo</td><td>yes</td><td>
30+
31+
repo parameter
32+
33+
</td></tr>
34+
<tr><td>run_id</td><td>yes</td><td>
35+
36+
run_id parameter
37+
38+
</td></tr>
39+
</tbody>
40+
</table>
41+
42+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow_runs/#delete-workflow-run-logs).

scripts/update-endpoints/generated/endpoints.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14057,6 +14057,62 @@
1405714057
"responses": [],
1405814058
"renamed": null
1405914059
},
14060+
{
14061+
"name": "Delete workflow run logs",
14062+
"scope": "actions",
14063+
"id": "deleteWorkflowRunLogs",
14064+
"method": "DELETE",
14065+
"url": "/repos/{owner}/{repo}/actions/runs/{run_id}/logs",
14066+
"isDeprecated": false,
14067+
"isLegacy": false,
14068+
"description": "Deletes all logs for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.",
14069+
"documentationUrl": "https://developer.github.com/v3/actions/workflow_runs/#delete-workflow-run-logs",
14070+
"previews": [],
14071+
"headers": [],
14072+
"parameters": [
14073+
{
14074+
"name": "owner",
14075+
"description": "owner parameter",
14076+
"in": "PATH",
14077+
"type": "string",
14078+
"required": true,
14079+
"enum": null,
14080+
"allowNull": false,
14081+
"mapToData": null,
14082+
"validation": null,
14083+
"alias": null,
14084+
"deprecated": null
14085+
},
14086+
{
14087+
"name": "repo",
14088+
"description": "repo parameter",
14089+
"in": "PATH",
14090+
"type": "string",
14091+
"required": true,
14092+
"enum": null,
14093+
"allowNull": false,
14094+
"mapToData": null,
14095+
"validation": null,
14096+
"alias": null,
14097+
"deprecated": null
14098+
},
14099+
{
14100+
"name": "run_id",
14101+
"description": "run_id parameter",
14102+
"in": "PATH",
14103+
"type": "integer",
14104+
"required": true,
14105+
"enum": null,
14106+
"allowNull": false,
14107+
"mapToData": null,
14108+
"validation": null,
14109+
"alias": null,
14110+
"deprecated": null
14111+
}
14112+
],
14113+
"responses": [],
14114+
"renamed": null
14115+
},
1406014116
{
1406114117
"name": "Re-run a workflow",
1406214118
"scope": "actions",

src/generated/endpoints.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
1919
deleteSecretFromRepo: [
2020
"DELETE /repos/{owner}/{repo}/actions/secrets/{name}",
2121
],
22+
deleteWorkflowRunLogs: [
23+
"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs",
24+
],
2225
downloadArtifact: [
2326
"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}",
2427
],

src/generated/types.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21728,6 +21728,11 @@ export type ActionsDeleteSecretFromRepoParams = {
2172821728
owner: string;
2172921729
repo: string;
2173021730
};
21731+
export type ActionsDeleteWorkflowRunLogsParams = {
21732+
owner: string;
21733+
repo: string;
21734+
run_id: number;
21735+
};
2173121736
export type ActionsDownloadArtifactParams = {
2173221737
archive_format: string;
2173321738
artifact_id: number;
@@ -28452,6 +28457,16 @@ export type RestEndpointMethods = {
2845228457

2845328458
endpoint: EndpointInterface;
2845428459
};
28460+
/**
28461+
* Deletes all logs for a workflow run. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.
28462+
*/
28463+
deleteWorkflowRunLogs: {
28464+
(
28465+
params?: RequestParameters & ActionsDeleteWorkflowRunLogsParams
28466+
): Promise<AnyResponse>;
28467+
28468+
endpoint: EndpointInterface;
28469+
};
2845528470
/**
2845628471
* Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.
2845728472
*

0 commit comments

Comments
 (0)