You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/actions/addCustomLabelsToSelfHostedRunnerForOrg.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@ type: API method
11
11
Add custom labels to a self-hosted runner configured in an organization.
12
12
13
13
You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14
+
If the repository is private, you must use an access token with the `repo` scope.
15
+
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
16
+
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
Copy file name to clipboardExpand all lines: docs/actions/addCustomLabelsToSelfHostedRunnerForRepo.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,10 @@ type: API method
10
10
11
11
Add custom labels to a self-hosted runner configured in a repository.
12
12
13
-
You must authenticate using an access token with the `repo` scope to use this
14
-
endpoint.
13
+
You must authenticate using an access token with the `repo` scope to use this endpoint.
14
+
If the repository is private, you must use an access token with the `repo` scope.
15
+
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
16
+
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
Copy file name to clipboardExpand all lines: docs/actions/addSelectedRepoToOrgSecret.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,14 @@ type: API method
8
8
9
9
# Add selected repository to an organization secret
10
10
11
-
Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
11
+
Adds a repository to an organization secret when the `visibility` for
12
+
repository access is set to `selected`. The visibility is set when you [Create or
13
+
update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret).
14
+
15
+
You must authenticate using an access token with the `admin:org` scope to use this endpoint.
16
+
If the repository is private, you must use an access token with the `repo` scope.
17
+
GitHub Apps must have the `secrets` organization permission to use this endpoint.
18
+
Authenticated users must have collaborator access to a repository to create, update, or read secrets.
12
19
13
20
```js
14
21
octokit.rest.actions.addSelectedRepoToOrgSecret({
@@ -45,4 +52,4 @@ The name of the secret.
45
52
</tbody>
46
53
</table>
47
54
48
-
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret).
55
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret).
Copy file name to clipboardExpand all lines: docs/actions/addSelectedRepoToOrgVariable.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,13 @@ type: API method
8
8
9
9
# Add selected repository to an organization variable
10
10
11
-
Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.
11
+
Adds a repository to an organization variable that is available to selected repositories.
12
+
Organization variables that are available to selected repositories have their `visibility` field set to `selected`.
13
+
14
+
You must authenticate using an access token with the `admin:org` scope to use this endpoint.
15
+
If the repository is private, you must use an access token with the `repo` scope.
16
+
GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.
17
+
Authenticated users must have collaborator access to a repository to create, update, or read variables.
Copy file name to clipboardExpand all lines: docs/actions/cancelWorkflowRun.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,11 @@ type: API method
8
8
9
9
# Cancel a workflow run
10
10
11
-
Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
11
+
Cancels a workflow run using its `id`.
12
+
13
+
You must authenticate using an access token with the `repo` scope to use this endpoint.
14
+
If the repository is private, you must use an access token with the `repo` scope.
15
+
GitHub Apps must have the `actions:write` permission to use this endpoint.
12
16
13
17
```js
14
18
octokit.rest.actions.cancelWorkflowRun({
@@ -47,4 +51,4 @@ The unique identifier of the workflow run.
47
51
</tbody>
48
52
</table>
49
53
50
-
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#cancel-a-workflow-run).
54
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run).
Copy file name to clipboardExpand all lines: docs/actions/createOrUpdateEnvironmentSecret.md
+6-76
Original file line number
Diff line number
Diff line change
@@ -9,81 +9,11 @@ type: API method
9
9
# Create or update an environment secret
10
10
11
11
Creates or updates an environment secret with an encrypted value. Encrypt your secret using
12
-
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
13
-
token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
14
-
this endpoint.
12
+
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
15
13
16
-
**Example encrypting a secret using Node.js**
17
-
18
-
Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.
19
-
20
-
```
21
-
const sodium = require('libsodium-wrappers')
22
-
const secret = 'plain-text-secret' // replace with the secret you want to encrypt
23
-
const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key
24
-
25
-
//Check if libsodium is ready and then proceed.
26
-
sodium.ready.then(() => {
27
-
// Convert Secret & Base64 key to Uint8Array.
28
-
let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)
29
-
let binsec = sodium.from_string(secret)
30
-
31
-
//Encrypt the secret using LibSodium
32
-
let encBytes = sodium.crypto_box_seal(binsec, binkey)
33
-
34
-
// Convert encrypted Uint8Array to Base64
35
-
let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)
36
-
37
-
console.log(output)
38
-
});
39
-
```
40
-
41
-
**Example encrypting a secret using Python**
42
-
43
-
Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint.
56
+
Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/actions/secrets#get-an-environment-public-key) endpoint.
127
57
128
58
</td></tr>
129
59
<tr><td>key_id</td><td>yes</td><td>
@@ -134,4 +64,4 @@ ID of the key you used to encrypt the secret.
134
64
</tbody>
135
65
</table>
136
66
137
-
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret).
67
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/secrets#create-or-update-an-environment-secret).
Copy file name to clipboardExpand all lines: docs/actions/createOrUpdateRepoSecret.md
+6-76
Original file line number
Diff line number
Diff line change
@@ -9,81 +9,11 @@ type: API method
9
9
# Create or update a repository secret
10
10
11
11
Creates or updates a repository secret with an encrypted value. Encrypt your secret using
12
-
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
13
-
token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
14
-
this endpoint.
12
+
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
15
13
16
-
**Example encrypting a secret using Node.js**
17
-
18
-
Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.
19
-
20
-
```
21
-
const sodium = require('libsodium-wrappers')
22
-
const secret = 'plain-text-secret' // replace with the secret you want to encrypt
23
-
const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key
24
-
25
-
//Check if libsodium is ready and then proceed.
26
-
sodium.ready.then(() => {
27
-
// Convert Secret & Base64 key to Uint8Array.
28
-
let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)
29
-
let binsec = sodium.from_string(secret)
30
-
31
-
//Encrypt the secret using LibSodium
32
-
let encBytes = sodium.crypto_box_seal(binsec, binkey)
33
-
34
-
// Convert encrypted Uint8Array to Base64
35
-
let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)
36
-
37
-
console.log(output)
38
-
});
39
-
```
40
-
41
-
**Example encrypting a secret using Python**
42
-
43
-
Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
You must authenticate using an access token with the `repo` scope to use this endpoint.
15
+
GitHub Apps must have the `secrets` repository permission to use this endpoint.
16
+
Authenticated users must have collaborator access to a repository to create, update, or read secrets.
87
17
88
18
```js
89
19
octokit.rest.actions.createOrUpdateRepoSecret({
@@ -121,7 +51,7 @@ The name of the secret.
121
51
</td></tr>
122
52
<tr><td>encrypted_value</td><td>no</td><td>
123
53
124
-
Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint.
54
+
Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/actions/secrets#get-a-repository-public-key) endpoint.
125
55
126
56
</td></tr>
127
57
<tr><td>key_id</td><td>no</td><td>
@@ -132,4 +62,4 @@ ID of the key you used to encrypt the secret.
132
62
</tbody>
133
63
</table>
134
64
135
-
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret).
65
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/secrets#create-or-update-a-repository-secret).
Copy file name to clipboardExpand all lines: docs/actions/createRegistrationTokenForOrg.md
+5-2
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,11 @@ type: API method
11
11
Returns a token that you can pass to the `config` script. The token expires after one hour.
12
12
13
13
You must authenticate using an access token with the `admin:org` scope to use this endpoint.
14
+
If the repository is private, you must use an access token with the `repo` scope.
15
+
GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations.
16
+
Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints.
14
17
15
-
#### Example using registration token
18
+
Example using registration token:
16
19
17
20
Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
18
21
@@ -45,4 +48,4 @@ The organization name. The name is not case sensitive.
45
48
</tbody>
46
49
</table>
47
50
48
-
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization).
51
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/actions/self-hosted-runners#create-a-registration-token-for-an-organization).
0 commit comments