Skip to content

Commit ce300d8

Browse files
feat: new endpoints for self hosted runners in organizations (#70)
Co-authored-by: Octokit Bot <33075676+octokitbot@users.noreply.github.com>
1 parent a3031c2 commit ce300d8

31 files changed

+1365
-66
lines changed

docs/actions/cancelWorkflowRun.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ run_id parameter
3939
</tbody>
4040
</table>
4141

42-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow_runs/#cancel-a-workflow-run).
42+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-runs/#cancel-a-workflow-run).

docs/actions/createRegistrationToken.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Create a registration token
1+
# Create a registration token for a repository
22

3-
Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.
3+
**Deprecated:** This method has been renamed to actions.createRegistrationTokenForRepo
4+
5+
Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.
46

57
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
68

@@ -35,4 +37,4 @@ repo parameter
3537
</tbody>
3638
</table>
3739

38-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self_hosted_runners/#create-a-registration-token).
40+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-a-repository).
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Create a registration token for an organization
2+
3+
**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.
4+
5+
Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint.
6+
7+
Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
8+
9+
```js
10+
octokit.actions.createRegistrationTokenForOrg({
11+
org,
12+
});
13+
```
14+
15+
## Parameters
16+
17+
<table>
18+
<thead>
19+
<tr>
20+
<th>name</th>
21+
<th>required</th>
22+
<th>description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr><td>org</td><td>yes</td><td>
27+
28+
org parameter
29+
30+
</td></tr>
31+
</tbody>
32+
</table>
33+
34+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-an-organization).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Create a registration token for a repository
2+
3+
Returns a token that you can pass to the `config` script. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.
4+
5+
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
6+
7+
```js
8+
octokit.actions.createRegistrationTokenForRepo({
9+
owner,
10+
repo,
11+
});
12+
```
13+
14+
## Parameters
15+
16+
<table>
17+
<thead>
18+
<tr>
19+
<th>name</th>
20+
<th>required</th>
21+
<th>description</th>
22+
</tr>
23+
</thead>
24+
<tbody>
25+
<tr><td>owner</td><td>yes</td><td>
26+
27+
owner parameter
28+
29+
</td></tr>
30+
<tr><td>repo</td><td>yes</td><td>
31+
32+
repo parameter
33+
34+
</td></tr>
35+
</tbody>
36+
</table>
37+
38+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#create-a-registration-token-for-a-repository).

docs/actions/createRemoveToken.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Create a remove token
1+
# Create a remove token for a repository
22

3-
Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration` permission to use this endpoint.
3+
**Deprecated:** This method has been renamed to actions.createRemoveTokenForRepo
4+
5+
Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.
46

57
Remove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.
68

@@ -35,4 +37,4 @@ repo parameter
3537
</tbody>
3638
</table>
3739

38-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self_hosted_runners/#create-a-remove-token).
40+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-a-repository).
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Create a remove token for an organization
2+
3+
**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.
4+
5+
Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint.
6+
7+
To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this endpoint.
8+
9+
```js
10+
octokit.actions.createRemoveTokenForOrg({
11+
org,
12+
});
13+
```
14+
15+
## Parameters
16+
17+
<table>
18+
<thead>
19+
<tr>
20+
<th>name</th>
21+
<th>required</th>
22+
<th>description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr><td>org</td><td>yes</td><td>
27+
28+
org parameter
29+
30+
</td></tr>
31+
</tbody>
32+
</table>
33+
34+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-an-organization).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Create a remove token for a repository
2+
3+
Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.
4+
5+
Remove your self-hosted runner from a repository, replacing TOKEN with the remove token provided by this endpoint.
6+
7+
```js
8+
octokit.actions.createRemoveTokenForRepo({
9+
owner,
10+
repo,
11+
});
12+
```
13+
14+
## Parameters
15+
16+
<table>
17+
<thead>
18+
<tr>
19+
<th>name</th>
20+
<th>required</th>
21+
<th>description</th>
22+
</tr>
23+
</thead>
24+
<tbody>
25+
<tr><td>owner</td><td>yes</td><td>
26+
27+
owner parameter
28+
29+
</td></tr>
30+
<tr><td>repo</td><td>yes</td><td>
31+
32+
repo parameter
33+
34+
</td></tr>
35+
</tbody>
36+
</table>
37+
38+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-a-repository).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Delete a self-hosted runner from an organization
2+
3+
**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.
4+
5+
Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the organization can use this endpoint. GitHub Apps must have the `self-hosted runners:write` organization permission to use this endpoint.
6+
7+
```js
8+
octokit.actions.deleteSelfHostedRunnerFromOrg({
9+
org,
10+
runner_id,
11+
});
12+
```
13+
14+
## Parameters
15+
16+
<table>
17+
<thead>
18+
<tr>
19+
<th>name</th>
20+
<th>required</th>
21+
<th>description</th>
22+
</tr>
23+
</thead>
24+
<tbody>
25+
<tr><td>org</td><td>yes</td><td>
26+
27+
org parameter
28+
29+
</td></tr>
30+
<tr><td>runner_id</td><td>yes</td><td>
31+
32+
runner_id parameter
33+
34+
</td></tr>
35+
</tbody>
36+
</table>
37+
38+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#delete-a-self-hosted-runner-from-an-organization).
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Delete a self-hosted runner from a repository
2+
3+
Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. Anyone with admin access to the repository can use this endpoint. GitHub Apps must have the `administration:write` repository permission to use this endpoint.
4+
5+
```js
6+
octokit.actions.deleteSelfHostedRunnerFromRepo({
7+
owner,
8+
repo,
9+
runner_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>runner_id</td><td>yes</td><td>
35+
36+
runner_id parameter
37+
38+
</td></tr>
39+
</tbody>
40+
</table>
41+
42+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/self-hosted-runners/#delete-a-self-hosted-runner-from-a-repository).

docs/actions/deleteWorkflowRunLogs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ run_id parameter
3939
</tbody>
4040
</table>
4141

42-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow_runs/#delete-workflow-run-logs).
42+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/workflow-runs/#delete-workflow-run-logs).

0 commit comments

Comments
 (0)