From 6059bf133ce43919e8a182adafb79e4edb302292 Mon Sep 17 00:00:00 2001 From: docs-bot <77750099+docs-bot@users.noreply.github.com> Date: Mon, 2 Oct 2023 05:08:38 -0700 Subject: [PATCH] Update OpenAPI Description (#43575) --- .../fine-grained-pat-permissions.json | 9 ++ .../data/fpt-2022-11-28/fine-grained-pat.json | 6 + .../server-to-server-permissions.json | 11 ++ .../fpt-2022-11-28/user-to-server-rest.json | 6 + .../fine-grained-pat-permissions.json | 9 ++ .../ghec-2022-11-28/fine-grained-pat.json | 6 + .../server-to-server-permissions.json | 11 ++ .../ghec-2022-11-28/user-to-server-rest.json | 6 + src/github-apps/lib/config.json | 2 +- src/rest/data/fpt-2022-11-28/schema.json | 120 ++++++++++++++++++ src/rest/data/ghec-2022-11-28/schema.json | 120 ++++++++++++++++++ .../data/ghes-3.10-2022-11-28/schema.json | 2 +- src/rest/data/ghes-3.8/schema.json | 2 +- src/rest/data/ghes-3.9-2022-11-28/schema.json | 2 +- src/rest/lib/config.json | 2 +- src/webhooks/lib/config.json | 2 +- 16 files changed, 310 insertions(+), 6 deletions(-) diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json index 604dbb0f31..253203313f 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json @@ -3435,6 +3435,15 @@ "additional-permissions": [], "access": "write" }, + { + "category": "codespaces", + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check", + "additional-permissions": [], + "access": "write" + }, { "category": "codespaces", "slug": "create-a-codespace-from-a-pull-request", diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json index 6244bce0b3..20b5d2ff15 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json @@ -1452,6 +1452,12 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/codespaces/new" }, + { + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check" + }, { "slug": "list-repository-secrets", "subcategory": "repository-secrets", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json index 0a6952f9b5..88ca280de3 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json @@ -4247,6 +4247,17 @@ "server-to-server": false, "additional-permissions": [] }, + { + "category": "codespaces", + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check", + "access": "write", + "user-to-server": true, + "server-to-server": false, + "additional-permissions": [] + }, { "category": "codespaces", "slug": "create-a-codespace-from-a-pull-request", diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json index 4d8f2444f2..baec844cb2 100644 --- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json @@ -1470,6 +1470,12 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/codespaces/new" }, + { + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check" + }, { "slug": "list-repository-secrets", "subcategory": "repository-secrets", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json index c58782579e..8a7d14f726 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json @@ -4093,6 +4093,15 @@ "additional-permissions": [], "access": "write" }, + { + "category": "codespaces", + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check", + "additional-permissions": [], + "access": "write" + }, { "category": "codespaces", "slug": "create-a-codespace-from-a-pull-request", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json index 80bae6424d..c9af0d52f5 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json @@ -1568,6 +1568,12 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/codespaces/new" }, + { + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check" + }, { "slug": "list-repository-secrets", "subcategory": "repository-secrets", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json index d9f030fde2..000a90b741 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json @@ -5041,6 +5041,17 @@ "server-to-server": false, "additional-permissions": [] }, + { + "category": "codespaces", + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check", + "access": "write", + "user-to-server": true, + "server-to-server": false, + "additional-permissions": [] + }, { "category": "codespaces", "slug": "create-a-codespace-from-a-pull-request", diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json index 1a890a547b..bd1ed9948d 100644 --- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json @@ -1586,6 +1586,12 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/codespaces/new" }, + { + "slug": "check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user", + "subcategory": "codespaces", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check" + }, { "slug": "list-repository-secrets", "subcategory": "repository-secrets", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index 6a4cb5e045..a5584d48ec 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "ffaf232180dbaff57ce08fa5490df44bbc606501" + "sha": "2b0299e5e69c42a2e28b40344541fe085a1ca617" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index ac7ef8e0c4..93e299d604 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -160697,6 +160697,126 @@ } ] }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check", + "title": "Check if permissions defined by a devcontainer have been accepted by the authenticated user", + "category": "codespaces", + "subcategory": "codespaces", + "parameters": [ + { + "name": "owner", + "description": "
The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of ref will typically be a branch name (heads/BRANCH_NAME). For more information, see \"Git References\" in the Git documentation.
Path to the devcontainer.json configuration to use for the permission check.
", + "in": "query", + "required": true, + "schema": { + "type": "string", + "examples": [ + ".devcontainer/example/devcontainer.json" + ] + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response when the permission check is successful
", + "example": { + "accepted": true + }, + "schema": { + "title": "Codespaces Permissions Check", + "description": "Permission check result for a given devcontainer config.", + "type": "object", + "properties": { + "accepted": { + "description": "Whether the user has accepted the permissions defined by the devcontainer config", + "type": "boolean", + "examples": [ + true + ] + } + }, + "required": [ + "accepted" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.
\nYou must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have write access to the codespaces repository permission to use this endpoint.
Response when the permission check is successful
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + }, + { + "httpStatusCode": "503", + "description": "Service unavailable
" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "post", diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index 71ac431024..53488be60e 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -172406,6 +172406,126 @@ } ] }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/codespaces/permissions_check", + "title": "Check if permissions defined by a devcontainer have been accepted by the authenticated user", + "category": "codespaces", + "subcategory": "codespaces", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of ref will typically be a branch name (heads/BRANCH_NAME). For more information, see \"Git References\" in the Git documentation.
Path to the devcontainer.json configuration to use for the permission check.
", + "in": "query", + "required": true, + "schema": { + "type": "string", + "examples": [ + ".devcontainer/example/devcontainer.json" + ] + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response when the permission check is successful
", + "example": { + "accepted": true + }, + "schema": { + "title": "Codespaces Permissions Check", + "description": "Permission check result for a given devcontainer config.", + "type": "object", + "properties": { + "accepted": { + "description": "Whether the user has accepted the permissions defined by the devcontainer config", + "type": "boolean", + "examples": [ + true + ] + } + }, + "required": [ + "accepted" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.
\nYou must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have write access to the codespaces repository permission to use this endpoint.
Response when the permission check is successful
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + }, + { + "httpStatusCode": "503", + "description": "Service unavailable
" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "post", diff --git a/src/rest/data/ghes-3.10-2022-11-28/schema.json b/src/rest/data/ghes-3.10-2022-11-28/schema.json index 6e19389422..282a0f8190 100644 --- a/src/rest/data/ghes-3.10-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.10-2022-11-28/schema.json @@ -314678,7 +314678,7 @@ } ], "previews": [], - "descriptionHTML": "Initiates the generation of a migration archive.
", + "descriptionHTML": "Initiates the generation of a migration archive.
\nBefore you can use this endpoint, you must configure a blob storage provider in the \"Migrations\" section in the Management Console. For more details, see \"Migrating repositories from GitHub Enterprise Server to GitHub Enterprise Cloud.\"
", "statusCodes": [ { "httpStatusCode": "201", diff --git a/src/rest/data/ghes-3.8/schema.json b/src/rest/data/ghes-3.8/schema.json index 79b34185ef..a7fd4a1eb2 100644 --- a/src/rest/data/ghes-3.8/schema.json +++ b/src/rest/data/ghes-3.8/schema.json @@ -309441,7 +309441,7 @@ } ], "previews": [], - "descriptionHTML": "Initiates the generation of a migration archive.
", + "descriptionHTML": "Initiates the generation of a migration archive.
\nBefore you can use this endpoint, you must configure a blob storage provider in the \"Migrations\" section in the Management Console. For more details, see \"Migrating repositories from GitHub Enterprise Server to GitHub Enterprise Cloud.\"
", "statusCodes": [ { "httpStatusCode": "201", diff --git a/src/rest/data/ghes-3.9-2022-11-28/schema.json b/src/rest/data/ghes-3.9-2022-11-28/schema.json index 02bc5f0bae..392ce9aeed 100644 --- a/src/rest/data/ghes-3.9-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.9-2022-11-28/schema.json @@ -312086,7 +312086,7 @@ } ], "previews": [], - "descriptionHTML": "Initiates the generation of a migration archive.
", + "descriptionHTML": "Initiates the generation of a migration archive.
\nBefore you can use this endpoint, you must configure a blob storage provider in the \"Migrations\" section in the Management Console. For more details, see \"Migrating repositories from GitHub Enterprise Server to GitHub Enterprise Cloud.\"
", "statusCodes": [ { "httpStatusCode": "201", diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index 21731946b5..4f8d223552 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -36,5 +36,5 @@ ] } }, - "sha": "ffaf232180dbaff57ce08fa5490df44bbc606501" + "sha": "2b0299e5e69c42a2e28b40344541fe085a1ca617" } \ No newline at end of file diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index 0a079841d6..36a08062f0 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "ffaf232180dbaff57ce08fa5490df44bbc606501" + "sha": "2b0299e5e69c42a2e28b40344541fe085a1ca617" } \ No newline at end of file