Skip to content

Commit

Permalink
fix: description updates (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Feb 28, 2021
1 parent 66256e1 commit f93082b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 101 deletions.
69 changes: 9 additions & 60 deletions cache/openapi-schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.3",
"info": {
"version": "2.12.0",
"version": "2.12.1",
"title": "GitHub's official OpenAPI spec + Octokit extension",
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
"license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
Expand Down Expand Up @@ -998,12 +998,12 @@
"type": "integer"
},
"repositories": {
"description": "The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified.",
"description": "The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified.",
"type": "array",
"items": { "type": "string", "example": "rails" }
},
"repository_ids": {
"description": "The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified.",
"description": "The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified.",
"example": [1],
"type": "array",
"items": { "type": "integer" }
Expand Down Expand Up @@ -20794,52 +20794,14 @@
},
"x-octokit": {}
},
"post": {
"summary": "Create an environment",
"description": "Create an environment for a repository. If an environment with the specified name already exists, the existing environment will be returned.\n\nThe created environment will not have any protection rules configured. To configure protection rules for the created environment, see \"[Set protection rules for an environment](#set-protection-rules-for-an-environment)\".\n\nYou must authenticate using an access token with the repo scope to use this endpoint.",
"tags": ["repos"],
"operationId": "repos/create-an-environment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-an-environment"
},
"parameters": [
{ "$ref": "#/components/parameters/owner" },
{ "$ref": "#/components/parameters/repo" },
{ "$ref": "#/components/parameters/environment_name" }
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/environment" },
"examples": {
"default": {
"$ref": "#/components/examples/environment-no-rules"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [],
"category": "repos",
"subcategory": "environments"
},
"x-octokit": {}
},
"put": {
"summary": "Set protection rules for an environment",
"description": "Set protection rules, such as required reviewers, for an environment. For more information about environment protection rules, see \"[Environments](/actions/reference/environments#environment-protection-rules).\"\n\n**Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"[Environments](/actions/reference/environments#deployment-branches).\"\n\nYou must authenticate using an access token with the repo scope to use this endpoint.",
"summary": "Create or update an environment",
"description": "Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see \"[Environments](/actions/reference/environments#environment-protection-rules).\"\n\n**Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"[Environments](/actions/reference/environments#deployment-branches).\"\n\n**Note:** To create or update secrets for an environment, see \"[Secrets](/rest/reference/actions#secrets).\"\n\nYou must authenticate using an access token with the repo scope to use this endpoint.",
"tags": ["repos"],
"operationId": "repos/set-environment-protection-rules",
"operationId": "repos/create-or-update-environment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#set-protection-rules-for-an-environment"
"url": "https://docs.github.com/rest/reference/repos#create-or-update-an-environment"
},
"parameters": [
{ "$ref": "#/components/parameters/owner" },
Expand All @@ -20855,7 +20817,7 @@
"wait_timer": { "$ref": "#/components/schemas/wait-timer" },
"reviewers": {
"type": "array",
"description": "The people or teams that may jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.",
"description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.",
"items": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -20891,7 +20853,7 @@
}
},
"422": {
"description": "Response when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value",
"description": "Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/basic-error" }
Expand Down Expand Up @@ -62576,19 +62538,6 @@
}
}
},
"environment-no-rules": {
"value": {
"id": 161088068,
"node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
"name": "staging",
"url": "https://api.github.com/repos/github/hello-world/environments/staging",
"html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
"created_at": "2020-11-23T22:00:40Z",
"updated_at": "2020-11-23T22:00:40Z",
"protection_rules": [],
"deployment_branch_policy": null
}
},
"minimal-repository-items-2": {
"value": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
]
},
"octokit": {
"openapi-version": "2.12.0"
"openapi-version": "2.12.1"
},
"@pika/pack": {
"pipeline": [
Expand Down
51 changes: 11 additions & 40 deletions src/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3056,21 +3056,15 @@ export interface paths {
/** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */
get: operations["repos/get-environment"];
/**
* Set protection rules, such as required reviewers, for an environment. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
* Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
*
* **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."
*
* You must authenticate using an access token with the repo scope to use this endpoint.
*/
put: operations["repos/set-environment-protection-rules"];
/**
* Create an environment for a repository. If an environment with the specified name already exists, the existing environment will be returned.
*
* The created environment will not have any protection rules configured. To configure protection rules for the created environment, see "[Set protection rules for an environment](#set-protection-rules-for-an-environment)".
* **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
*
* You must authenticate using an access token with the repo scope to use this endpoint.
*/
post: operations["repos/create-an-environment"];
put: operations["repos/create-or-update-environment"];
/** You must authenticate using an access token with the repo scope to use this endpoint. */
delete: operations["repos/delete-an-environment"];
};
Expand Down Expand Up @@ -10814,9 +10808,9 @@ export interface operations {
target?: string;
/** The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. */
target_id?: number;
/** The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */
/** The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */
repositories?: string[];
/** The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */
/** The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */
repository_ids?: number[];
permissions?: components["schemas"]["app-permissions"];
};
Expand Down Expand Up @@ -21919,13 +21913,15 @@ export interface operations {
};
};
/**
* Set protection rules, such as required reviewers, for an environment. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
* Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
*
* **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."
*
* **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
*
* You must authenticate using an access token with the repo scope to use this endpoint.
*/
"repos/set-environment-protection-rules": {
"repos/create-or-update-environment": {
parameters: {
path: {
owner: components["parameters"]["owner"];
Expand All @@ -21941,7 +21937,7 @@ export interface operations {
"application/json": components["schemas"]["environment"];
};
};
/** Response when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */
/** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */
422: {
content: {
"application/json": components["schemas"]["basic-error"];
Expand All @@ -21952,7 +21948,7 @@ export interface operations {
content: {
"application/json": {
wait_timer?: components["schemas"]["wait-timer"];
/** The people or teams that may jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */
/** The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */
reviewers?: {
type?: components["schemas"]["deployment-reviewer-type"];
/** The id of the user or team who can review the deployment */
Expand All @@ -21963,31 +21959,6 @@ export interface operations {
};
};
};
/**
* Create an environment for a repository. If an environment with the specified name already exists, the existing environment will be returned.
*
* The created environment will not have any protection rules configured. To configure protection rules for the created environment, see "[Set protection rules for an environment](#set-protection-rules-for-an-environment)".
*
* You must authenticate using an access token with the repo scope to use this endpoint.
*/
"repos/create-an-environment": {
parameters: {
path: {
owner: components["parameters"]["owner"];
repo: components["parameters"]["repo"];
/** The name of the environment */
environment_name: components["parameters"]["environment_name"];
};
};
responses: {
/** response */
200: {
content: {
"application/json": components["schemas"]["environment"];
};
};
};
};
/** You must authenticate using an access token with the repo scope to use this endpoint. */
"repos/delete-an-environment": {
parameters: {
Expand Down

0 comments on commit f93082b

Please sign in to comment.