diff --git a/descriptions/api.github.com/api.github.com.2022-11-28.json b/descriptions/api.github.com/api.github.com.2022-11-28.json index 39344d004..e22378b6d 100644 --- a/descriptions/api.github.com/api.github.com.2022-11-28.json +++ b/descriptions/api.github.com/api.github.com.2022-11-28.json @@ -59967,6 +59967,94 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#archive-a-pull-request" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/pull-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/pull-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/api.github.com/api.github.com.2022-11-28.yaml b/descriptions/api.github.com/api.github.com.2022-11-28.yaml index 5d8a0c68b..398183484 100644 --- a/descriptions/api.github.com/api.github.com.2022-11-28.yaml +++ b/descriptions/api.github.com/api.github.com.2022-11-28.yaml @@ -43651,6 +43651,67 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#archive-a-pull-request + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/api.github.com/api.github.com.2026-03-10.json b/descriptions/api.github.com/api.github.com.2026-03-10.json index 3cc0a2852..32ea96b22 100644 --- a/descriptions/api.github.com/api.github.com.2026-03-10.json +++ b/descriptions/api.github.com/api.github.com.2026-03-10.json @@ -59884,6 +59884,94 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#archive-a-pull-request" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/pull-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/pull-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/api.github.com/api.github.com.2026-03-10.yaml b/descriptions/api.github.com/api.github.com.2026-03-10.yaml index c059b19cf..71a282111 100644 --- a/descriptions/api.github.com/api.github.com.2026-03-10.yaml +++ b/descriptions/api.github.com/api.github.com.2026-03-10.yaml @@ -43580,6 +43580,67 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#archive-a-pull-request + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/api.github.com/api.github.com.json b/descriptions/api.github.com/api.github.com.json index bad14541f..5ce746de3 100644 --- a/descriptions/api.github.com/api.github.com.json +++ b/descriptions/api.github.com/api.github.com.json @@ -60269,6 +60269,94 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#archive-a-pull-request" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/pull-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/pull-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/api.github.com/api.github.com.yaml b/descriptions/api.github.com/api.github.com.yaml index cd14a5fbf..9f0bdd586 100644 --- a/descriptions/api.github.com/api.github.com.yaml +++ b/descriptions/api.github.com/api.github.com.yaml @@ -43836,6 +43836,67 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#archive-a-pull-request + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json index fe7bdee7c..8d4f3f91f 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json +++ b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json @@ -489652,6 +489652,354 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#archive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml index b097f3bb4..a6b1e9726 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml +++ b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml @@ -87999,6 +87999,61 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#archive-a-pull-request + parameters: + - *342 + - *343 + - *597 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request + parameters: + - *342 + - *343 + - *597 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json index 1c04ebcd5..441fbe397 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json +++ b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json @@ -479353,6 +479353,354 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#archive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml index dbd202eb4..307d513bf 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml +++ b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml @@ -87483,6 +87483,61 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#archive-a-pull-request + parameters: + - *342 + - *343 + - *597 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request + parameters: + - *342 + - *343 + - *597 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/api.github.com/dereferenced/api.github.com.deref.json b/descriptions/api.github.com/dereferenced/api.github.com.deref.json index 79f1f0c12..f6675218e 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.deref.json +++ b/descriptions/api.github.com/dereferenced/api.github.com.deref.json @@ -502829,6 +502829,354 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#archive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml b/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml index 5412b156b..a393e443f 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml +++ b/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml @@ -88822,6 +88822,61 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#archive-a-pull-request + parameters: + - *344 + - *345 + - *600 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pulls/pulls#unarchive-a-pull-request + parameters: + - *344 + - *345 + - *600 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.json b/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.json index 2fdceb5aa..ac91054ef 100644 --- a/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.json +++ b/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.json @@ -551411,6 +551411,354 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#archive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#unarchive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.yaml b/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.yaml index 39f68d681..909f96b7f 100644 --- a/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.yaml +++ b/descriptions/ghec/dereferenced/ghec.2022-11-28.deref.yaml @@ -101906,6 +101906,61 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#archive-a-pull-request + parameters: + - *478 + - *479 + - *725 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#unarchive-a-pull-request + parameters: + - *478 + - *479 + - *725 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.json b/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.json index 8ff4c3905..893e3e5a7 100644 --- a/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.json +++ b/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.json @@ -540865,6 +540865,354 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#archive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#unarchive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + } + }, "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { "post": { "summary": "Create a codespace from a pull request", diff --git a/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.yaml b/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.yaml index 9c09cfde5..28dedd579 100644 --- a/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.yaml +++ b/descriptions/ghec/dereferenced/ghec.2026-03-10.deref.yaml @@ -101379,6 +101379,61 @@ paths: enabledForGitHubApps: true category: pulls subcategory: pulls + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": + put: + summary: Archive a pull request + description: |- + Archives a pull request. Closes, locks, and marks the pull request as archived. + Only repository admins can archive pull requests. + Archived pull requests are hidden from non-admin users. + tags: + - pulls + operationId: pulls/archive + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#archive-a-pull-request + parameters: + - *478 + - *479 + - *725 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls + delete: + summary: Unarchive a pull request + description: |- + Unarchives a pull request. Removes the archived flag from the pull request. + Does not automatically reopen or unlock the pull request. + Only repository admins can unarchive pull requests. + tags: + - pulls + operationId: pulls/unarchive + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#unarchive-a-pull-request + parameters: + - *478 + - *479 + - *725 + responses: + '204': + description: Response + '403': *29 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pulls + subcategory: pulls "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": post: summary: Create a codespace from a pull request diff --git a/descriptions/ghec/dereferenced/ghec.deref.json b/descriptions/ghec/dereferenced/ghec.deref.json index 29ebeaca8..18165e140 100644 --- a/descriptions/ghec/dereferenced/ghec.deref.json +++ b/descriptions/ghec/dereferenced/ghec.deref.json @@ -564836,6 +564836,354 @@ } } }, + "/repos/{owner}/{repo}/pulls/{pull_number}/archive": { + "put": { + "summary": "Archive a pull request", + "description": "Archives a pull request. Closes, locks, and marks the pull request as archived.\nOnly repository admins can archive pull requests.\nArchived pull requests are hidden from non-admin users.", + "tags": [ + "pulls" + ], + "operationId": "pulls/archive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#archive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "integer", + "nullable": true + }, + { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "pulls", + "subcategory": "pulls" + } + }, + "delete": { + "summary": "Unarchive a pull request", + "description": "Unarchives a pull request. Removes the archived flag from the pull request.\nDoes not automatically reopen or unlock the pull request.\nOnly repository admins can unarchive pull requests.", + "tags": [ + "pulls" + ], + "operationId": "pulls/unarchive", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#unarchive-a-pull-request" + }, + "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.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "The number that identifies the pull request.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + {"code":"deadline_exceeded","msg":"operation timed out"}