Skip to content

Commit

Permalink
feat: Environment(all endpoints have been updated from scheme reposit…
Browse files Browse the repository at this point in the history
…ories/{repository_id} to /repos/{owner}/{repo}), adds field repository.security.advisory (checkPrivateVulnerabilityReporting), docs(various resource docs have been updated and added) (#721)

BREAKING CHANGE: Updates multiple endpoints to use owner + repo in place of repository_id
  • Loading branch information
octokitbot committed Apr 3, 2024
1 parent f71bc31 commit 4a9125f
Show file tree
Hide file tree
Showing 46 changed files with 779 additions and 338 deletions.
16 changes: 11 additions & 5 deletions docs/actions/createEnvironmentVariable.md
@@ -1,7 +1,7 @@
---
name: Create an environment variable
example: octokit.rest.actions.createEnvironmentVariable({ repository_id, environment_name, name, value })
route: POST /repositories/{repository_id}/environments/{environment_name}/variables
example: octokit.rest.actions.createEnvironmentVariable({ owner, repo, environment_name, name, value })
route: POST /repos/{owner}/{repo}/environments/{environment_name}/variables
scope: actions
type: API method
---
Expand All @@ -16,7 +16,8 @@ OAuth tokens and personal access tokens (classic) need the `repo` scope to use t

```js
octokit.rest.actions.createEnvironmentVariable({
repository_id,
owner,
repo,
environment_name,
name,
value,
Expand All @@ -34,9 +35,14 @@ octokit.rest.actions.createEnvironmentVariable({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/createOrUpdateEnvironmentSecret.md
@@ -1,7 +1,7 @@
---
name: Create or update an environment secret
example: octokit.rest.actions.createOrUpdateEnvironmentSecret({ repository_id, environment_name, secret_name, encrypted_value, key_id })
route: PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
example: octokit.rest.actions.createOrUpdateEnvironmentSecret({ owner, repo, environment_name, secret_name, encrypted_value, key_id })
route: PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
scope: actions
type: API method
---
Expand All @@ -17,7 +17,8 @@ OAuth tokens and personal access tokens (classic) need the `repo` scope to use t

```js
octokit.rest.actions.createOrUpdateEnvironmentSecret({
repository_id,
owner,
repo,
environment_name,
secret_name,
encrypted_value,
Expand All @@ -36,9 +37,14 @@ octokit.rest.actions.createOrUpdateEnvironmentSecret({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/deleteEnvironmentSecret.md
@@ -1,7 +1,7 @@
---
name: Delete an environment secret
example: octokit.rest.actions.deleteEnvironmentSecret({ repository_id, environment_name, secret_name })
route: DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
example: octokit.rest.actions.deleteEnvironmentSecret({ owner, repo, environment_name, secret_name })
route: DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
scope: actions
type: API method
---
Expand All @@ -16,7 +16,8 @@ OAuth tokens and personal access tokens (classic) need the `repo` scope to use t

```js
octokit.rest.actions.deleteEnvironmentSecret({
repository_id,
owner,
repo,
environment_name,
secret_name,
});
Expand All @@ -33,9 +34,14 @@ octokit.rest.actions.deleteEnvironmentSecret({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/deleteEnvironmentVariable.md
@@ -1,7 +1,7 @@
---
name: Delete an environment variable
example: octokit.rest.actions.deleteEnvironmentVariable({ repository_id, name, environment_name })
route: DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}
example: octokit.rest.actions.deleteEnvironmentVariable({ owner, repo, name, environment_name })
route: DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
scope: actions
type: API method
---
Expand All @@ -16,7 +16,8 @@ OAuth tokens and personal access tokens (classic) need the `repo` scope to use t

```js
octokit.rest.actions.deleteEnvironmentVariable({
repository_id,
owner,
repo,
name,
environment_name,
});
Expand All @@ -33,9 +34,14 @@ octokit.rest.actions.deleteEnvironmentVariable({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>name</td><td>yes</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/getCustomOidcSubClaimForRepo.md
Expand Up @@ -9,8 +9,8 @@ type: API method
# Get the customization template for an OIDC subject claim for a repository

Gets the customization template for an OpenID Connect (OIDC) subject claim.
You must authenticate using an access token with the `repo` scope to use this
endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.getCustomOidcSubClaimForRepo({
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/getEnvironmentPublicKey.md
@@ -1,7 +1,7 @@
---
name: Get an environment public key
example: octokit.rest.actions.getEnvironmentPublicKey({ repository_id, environment_name })
route: GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key
example: octokit.rest.actions.getEnvironmentPublicKey({ owner, repo, environment_name })
route: GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key
scope: actions
type: API method
---
Expand All @@ -17,7 +17,8 @@ If the repository is private, OAuth tokens and personal access tokens (classic)

```js
octokit.rest.actions.getEnvironmentPublicKey({
repository_id,
owner,
repo,
environment_name,
});
```
Expand All @@ -33,9 +34,14 @@ octokit.rest.actions.getEnvironmentPublicKey({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/getEnvironmentSecret.md
@@ -1,7 +1,7 @@
---
name: Get an environment secret
example: octokit.rest.actions.getEnvironmentSecret({ repository_id, environment_name, secret_name })
route: GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
example: octokit.rest.actions.getEnvironmentSecret({ owner, repo, environment_name, secret_name })
route: GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
scope: actions
type: API method
---
Expand All @@ -16,7 +16,8 @@ OAuth tokens and personal access tokens (classic) need the `repo` scope to use t

```js
octokit.rest.actions.getEnvironmentSecret({
repository_id,
owner,
repo,
environment_name,
secret_name,
});
Expand All @@ -33,9 +34,14 @@ octokit.rest.actions.getEnvironmentSecret({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/getEnvironmentVariable.md
@@ -1,7 +1,7 @@
---
name: Get an environment variable
example: octokit.rest.actions.getEnvironmentVariable({ repository_id, environment_name, name })
route: GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}
example: octokit.rest.actions.getEnvironmentVariable({ owner, repo, environment_name, name })
route: GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
scope: actions
type: API method
---
Expand All @@ -16,7 +16,8 @@ OAuth tokens and personal access tokens (classic) need the `repo` scope to use t

```js
octokit.rest.actions.getEnvironmentVariable({
repository_id,
owner,
repo,
environment_name,
name,
});
Expand All @@ -33,9 +34,14 @@ octokit.rest.actions.getEnvironmentVariable({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/listEnvironmentSecrets.md
@@ -1,7 +1,7 @@
---
name: List environment secrets
example: octokit.rest.actions.listEnvironmentSecrets({ repository_id, environment_name })
route: GET /repositories/{repository_id}/environments/{environment_name}/secrets
example: octokit.rest.actions.listEnvironmentSecrets({ owner, repo, environment_name })
route: GET /repos/{owner}/{repo}/environments/{environment_name}/secrets
scope: actions
type: API method
---
Expand All @@ -17,7 +17,8 @@ OAuth app tokens and personal access tokens (classic) need the `repo` scope to u

```js
octokit.rest.actions.listEnvironmentSecrets({
repository_id,
owner,
repo,
environment_name,
});
```
Expand All @@ -33,9 +34,14 @@ octokit.rest.actions.listEnvironmentSecrets({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
16 changes: 11 additions & 5 deletions docs/actions/listEnvironmentVariables.md
@@ -1,7 +1,7 @@
---
name: List environment variables
example: octokit.rest.actions.listEnvironmentVariables({ repository_id, environment_name })
route: GET /repositories/{repository_id}/environments/{environment_name}/variables
example: octokit.rest.actions.listEnvironmentVariables({ owner, repo, environment_name })
route: GET /repos/{owner}/{repo}/environments/{environment_name}/variables
scope: actions
type: API method
---
Expand All @@ -16,7 +16,8 @@ OAuth app tokens and personal access tokens (classic) need the `repo` scope to u

```js
octokit.rest.actions.listEnvironmentVariables({
repository_id,
owner,
repo,
environment_name,
});
```
Expand All @@ -32,9 +33,14 @@ octokit.rest.actions.listEnvironmentVariables({
</tr>
</thead>
<tbody>
<tr><td>repository_id</td><td>yes</td><td>
<tr><td>owner</td><td>yes</td><td>

The unique identifier of the repository.
The account owner of the repository. The name is not case sensitive.

</td></tr>
<tr><td>repo</td><td>yes</td><td>

The name of the repository without the `.git` extension. The name is not case sensitive.

</td></tr>
<tr><td>environment_name</td><td>yes</td><td>
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/listWorkflowRuns.md
Expand Up @@ -65,7 +65,7 @@ Returns workflow run triggered by the event you specify. For example, `push`, `p
</td></tr>
<tr><td>status</td><td>no</td><td>

Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`.
Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.

</td></tr>
<tr><td>per_page</td><td>no</td><td>
Expand Down
4 changes: 3 additions & 1 deletion docs/actions/listWorkflowRunsForRepo.md
Expand Up @@ -14,6 +14,8 @@ Anyone with read access to the repository can use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`.

```js
octokit.rest.actions.listWorkflowRunsForRepo({
owner,
Expand Down Expand Up @@ -59,7 +61,7 @@ Returns workflow run triggered by the event you specify. For example, `push`, `p
</td></tr>
<tr><td>status</td><td>no</td><td>

Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`.
Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.

</td></tr>
<tr><td>per_page</td><td>no</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/setCustomOidcSubClaimForRepo.md
Expand Up @@ -9,8 +9,8 @@ type: API method
# Set the customization template for an OIDC subject claim for a repository

Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository.
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.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

```js
octokit.rest.actions.setCustomOidcSubClaimForRepo({
Expand Down

0 comments on commit 4a9125f

Please sign in to comment.