Skip to content

Commit c8c9573

Browse files
authored
docs: add frontmatter for search indexing on docs page (#73)
This adds frontmatter entries for the name of each method, the scope, an example snippet, a route, and a type of 'API method' to help with indexing search results on octokit.github.io/rest.js
1 parent 587c81d commit c8c9573

File tree

568 files changed

+4546
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

568 files changed

+4546
-0
lines changed

docs/actions/cancelWorkflowRun.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Cancel a workflow run
3+
example: octokit.actions.cancelWorkflowRun({ owner, repo, run_id })
4+
route: POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Cancel a workflow run
210

311
Cancels a workflow run using its `id`. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `actions` permission to use this endpoint.

docs/actions/createOrUpdateSecretForRepo.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create or update a secret for a repository
3+
example: octokit.actions.createOrUpdateSecretForRepo({ owner, repo, name })
4+
route: PUT /repos/{owner}/{repo}/actions/secrets/{name}
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create or update a secret for a repository
210

311
Creates or updates a secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.

docs/actions/createRegistrationToken.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create a registration token for a repository
3+
example: octokit.actions.createRegistrationToken({ owner, repo })
4+
route: POST /repos/{owner}/{repo}/actions/runners/registration-token
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create a registration token for a repository
210

311
**Deprecated:** This method has been renamed to actions.createRegistrationTokenForRepo

docs/actions/createRegistrationTokenForOrg.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create a registration token for an organization
3+
example: octokit.actions.createRegistrationTokenForOrg({ org })
4+
route: POST /orgs/{org}/actions/runners/registration-token
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create a registration token for an organization
210

311
**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.

docs/actions/createRegistrationTokenForRepo.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create a registration token for a repository
3+
example: octokit.actions.createRegistrationTokenForRepo({ owner, repo })
4+
route: POST /repos/{owner}/{repo}/actions/runners/registration-token
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create a registration token for a repository
210

311
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.

docs/actions/createRemoveToken.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create a remove token for a repository
3+
example: octokit.actions.createRemoveToken({ owner, repo })
4+
route: POST /repos/{owner}/{repo}/actions/runners/remove-token
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create a remove token for a repository
210

311
**Deprecated:** This method has been renamed to actions.createRemoveTokenForRepo

docs/actions/createRemoveTokenForOrg.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create a remove token for an organization
3+
example: octokit.actions.createRemoveTokenForOrg({ org })
4+
route: POST /orgs/{org}/actions/runners/remove-token
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create a remove token for an organization
210

311
**Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.

docs/actions/createRemoveTokenForRepo.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Create a remove token for a repository
3+
example: octokit.actions.createRemoveTokenForRepo({ owner, repo })
4+
route: POST /repos/{owner}/{repo}/actions/runners/remove-token
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Create a remove token for a repository
210

311
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.

docs/actions/deleteArtifact.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Delete an artifact
3+
example: octokit.actions.deleteArtifact({ owner, repo, artifact_id })
4+
route: DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Delete an artifact
210

311
Deletes an artifact 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.

docs/actions/deleteSecretFromRepo.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Delete a secret from a repository
3+
example: octokit.actions.deleteSecretFromRepo({ owner, repo, name })
4+
route: DELETE /repos/{owner}/{repo}/actions/secrets/{name}
5+
scope: actions
6+
type: API method
7+
---
8+
19
# Delete a secret from a repository
210

311
Deletes a secret in a repository using the secret name. Anyone with write access to the repository can use this endpoint. GitHub Apps must have the `secrets` permission to use this endpoint.

0 commit comments

Comments
 (0)