Skip to content

Commit f93082b

Browse files
authored
fix: description updates (#58)
1 parent 66256e1 commit f93082b

File tree

3 files changed

+21
-101
lines changed

3 files changed

+21
-101
lines changed

cache/openapi-schema.json

Lines changed: 9 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.3",
33
"info": {
4-
"version": "2.12.0",
4+
"version": "2.12.1",
55
"title": "GitHub's official OpenAPI spec + Octokit extension",
66
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
77
"license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
@@ -998,12 +998,12 @@
998998
"type": "integer"
999999
},
10001000
"repositories": {
1001-
"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.",
1001+
"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.",
10021002
"type": "array",
10031003
"items": { "type": "string", "example": "rails" }
10041004
},
10051005
"repository_ids": {
1006-
"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.",
1006+
"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.",
10071007
"example": [1],
10081008
"type": "array",
10091009
"items": { "type": "integer" }
@@ -20794,52 +20794,14 @@
2079420794
},
2079520795
"x-octokit": {}
2079620796
},
20797-
"post": {
20798-
"summary": "Create an environment",
20799-
"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.",
20800-
"tags": ["repos"],
20801-
"operationId": "repos/create-an-environment",
20802-
"externalDocs": {
20803-
"description": "API method documentation",
20804-
"url": "https://docs.github.com/rest/reference/repos#create-an-environment"
20805-
},
20806-
"parameters": [
20807-
{ "$ref": "#/components/parameters/owner" },
20808-
{ "$ref": "#/components/parameters/repo" },
20809-
{ "$ref": "#/components/parameters/environment_name" }
20810-
],
20811-
"responses": {
20812-
"200": {
20813-
"description": "response",
20814-
"content": {
20815-
"application/json": {
20816-
"schema": { "$ref": "#/components/schemas/environment" },
20817-
"examples": {
20818-
"default": {
20819-
"$ref": "#/components/examples/environment-no-rules"
20820-
}
20821-
}
20822-
}
20823-
}
20824-
}
20825-
},
20826-
"x-github": {
20827-
"githubCloudOnly": false,
20828-
"enabledForGitHubApps": true,
20829-
"previews": [],
20830-
"category": "repos",
20831-
"subcategory": "environments"
20832-
},
20833-
"x-octokit": {}
20834-
},
2083520797
"put": {
20836-
"summary": "Set protection rules for an environment",
20837-
"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.",
20798+
"summary": "Create or update an environment",
20799+
"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.",
2083820800
"tags": ["repos"],
20839-
"operationId": "repos/set-environment-protection-rules",
20801+
"operationId": "repos/create-or-update-environment",
2084020802
"externalDocs": {
2084120803
"description": "API method documentation",
20842-
"url": "https://docs.github.com/rest/reference/repos#set-protection-rules-for-an-environment"
20804+
"url": "https://docs.github.com/rest/reference/repos#create-or-update-an-environment"
2084320805
},
2084420806
"parameters": [
2084520807
{ "$ref": "#/components/parameters/owner" },
@@ -20855,7 +20817,7 @@
2085520817
"wait_timer": { "$ref": "#/components/schemas/wait-timer" },
2085620818
"reviewers": {
2085720819
"type": "array",
20858-
"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.",
20820+
"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.",
2085920821
"items": {
2086020822
"type": "object",
2086120823
"properties": {
@@ -20891,7 +20853,7 @@
2089120853
}
2089220854
},
2089320855
"422": {
20894-
"description": "Response when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value",
20856+
"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",
2089520857
"content": {
2089620858
"application/json": {
2089720859
"schema": { "$ref": "#/components/schemas/basic-error" }
@@ -62576,19 +62538,6 @@
6257662538
}
6257762539
}
6257862540
},
62579-
"environment-no-rules": {
62580-
"value": {
62581-
"id": 161088068,
62582-
"node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
62583-
"name": "staging",
62584-
"url": "https://api.github.com/repos/github/hello-world/environments/staging",
62585-
"html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
62586-
"created_at": "2020-11-23T22:00:40Z",
62587-
"updated_at": "2020-11-23T22:00:40Z",
62588-
"protection_rules": [],
62589-
"deployment_branch_policy": null
62590-
}
62591-
},
6259262541
"minimal-repository-items-2": {
6259362542
"value": [
6259462543
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
]
5454
},
5555
"octokit": {
56-
"openapi-version": "2.12.0"
56+
"openapi-version": "2.12.1"
5757
},
5858
"@pika/pack": {
5959
"pipeline": [

src/generated/types.ts

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,21 +3056,15 @@ export interface paths {
30563056
/** 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. */
30573057
get: operations["repos/get-environment"];
30583058
/**
3059-
* 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)."
3059+
* 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)."
30603060
*
30613061
* **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)."
30623062
*
3063-
* You must authenticate using an access token with the repo scope to use this endpoint.
3064-
*/
3065-
put: operations["repos/set-environment-protection-rules"];
3066-
/**
3067-
* Create an environment for a repository. If an environment with the specified name already exists, the existing environment will be returned.
3068-
*
3069-
* 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)".
3063+
* **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
30703064
*
30713065
* You must authenticate using an access token with the repo scope to use this endpoint.
30723066
*/
3073-
post: operations["repos/create-an-environment"];
3067+
put: operations["repos/create-or-update-environment"];
30743068
/** You must authenticate using an access token with the repo scope to use this endpoint. */
30753069
delete: operations["repos/delete-an-environment"];
30763070
};
@@ -10814,9 +10808,9 @@ export interface operations {
1081410808
target?: string;
1081510809
/** The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. */
1081610810
target_id?: number;
10817-
/** The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */
10811+
/** The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */
1081810812
repositories?: string[];
10819-
/** The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */
10813+
/** The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */
1082010814
repository_ids?: number[];
1082110815
permissions?: components["schemas"]["app-permissions"];
1082210816
};
@@ -21919,13 +21913,15 @@ export interface operations {
2191921913
};
2192021914
};
2192121915
/**
21922-
* 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)."
21916+
* 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)."
2192321917
*
2192421918
* **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)."
2192521919
*
21920+
* **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
21921+
*
2192621922
* You must authenticate using an access token with the repo scope to use this endpoint.
2192721923
*/
21928-
"repos/set-environment-protection-rules": {
21924+
"repos/create-or-update-environment": {
2192921925
parameters: {
2193021926
path: {
2193121927
owner: components["parameters"]["owner"];
@@ -21941,7 +21937,7 @@ export interface operations {
2194121937
"application/json": components["schemas"]["environment"];
2194221938
};
2194321939
};
21944-
/** Response when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */
21940+
/** 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 */
2194521941
422: {
2194621942
content: {
2194721943
"application/json": components["schemas"]["basic-error"];
@@ -21952,7 +21948,7 @@ export interface operations {
2195221948
content: {
2195321949
"application/json": {
2195421950
wait_timer?: components["schemas"]["wait-timer"];
21955-
/** 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. */
21951+
/** 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. */
2195621952
reviewers?: {
2195721953
type?: components["schemas"]["deployment-reviewer-type"];
2195821954
/** The id of the user or team who can review the deployment */
@@ -21963,31 +21959,6 @@ export interface operations {
2196321959
};
2196421960
};
2196521961
};
21966-
/**
21967-
* Create an environment for a repository. If an environment with the specified name already exists, the existing environment will be returned.
21968-
*
21969-
* 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)".
21970-
*
21971-
* You must authenticate using an access token with the repo scope to use this endpoint.
21972-
*/
21973-
"repos/create-an-environment": {
21974-
parameters: {
21975-
path: {
21976-
owner: components["parameters"]["owner"];
21977-
repo: components["parameters"]["repo"];
21978-
/** The name of the environment */
21979-
environment_name: components["parameters"]["environment_name"];
21980-
};
21981-
};
21982-
responses: {
21983-
/** response */
21984-
200: {
21985-
content: {
21986-
"application/json": components["schemas"]["environment"];
21987-
};
21988-
};
21989-
};
21990-
};
2199121962
/** You must authenticate using an access token with the repo scope to use this endpoint. */
2199221963
"repos/delete-an-environment": {
2199321964
parameters: {

0 commit comments

Comments
 (0)