[API] Add endpoint to delete PRs #11932

Closed
opened 2025-11-02 09:52:08 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @jthvai on GitHub (Oct 30, 2023).

Feature Description

TL;DR:

DELETE /repos/{owner}/{repo}/pulls/{index}

This endpoint should be equivalent to the "Delete" button on a pull request's page (refer to screenshot below).

Screenshot: PR page with the Delete button highlighted

example

An equivalent endpoint doesn't exist in GitHub's API, but it would make sense to implement it like deleting an issue (where a DELETE request is sent to the same route as GETing an issue).

Screenshots

No response

Originally created by @jthvai on GitHub (Oct 30, 2023). ### Feature Description TL;DR: ``` DELETE /repos/{owner}/{repo}/pulls/{index} ``` *** This endpoint should be equivalent to the "Delete" button on a pull request's page (refer to screenshot below). <details><summary>Screenshot: PR page with the Delete button highlighted</summary> ![example](https://github.com/go-gitea/gitea/assets/49891202/2a62d666-c4c0-411f-a299-96c4d6b5663c) </details> An equivalent endpoint doesn't exist in [GitHub's API](https://docs.github.com/en/rest/pulls/pulls), but it would make sense to implement it like [deleting an issue](https://try.gitea.io/api/swagger#/issue/issueDelete) (where a `DELETE` request is sent to the same route as `GET`ing an issue). ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 09:52:08 -06:00
Author
Owner

@jthvai commented on GitHub (Dec 6, 2023):

Closing as functionality is provided by DELETE /repos/{owner}/{repo}/issues/{index}; issues and PRs are the same internally.

@jthvai commented on GitHub (Dec 6, 2023): Closing as functionality is provided by `DELETE /repos/{owner}/{repo}/issues/{index}`; issues and PRs are the same internally.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11932