Skip to content

Request New API: get the current opened pull request by base and head #16289

Closed
@lchrennew

Description

@lchrennew
  • Gitea version (or commit ref): 1.14.3
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

For comparing page, I need an API to fetch the opened PR by the base branch and the head branch.
The request will look like this:

GET /repos/{owner}/{repo}/pulls/{base}/{head}?state=open

and the response:

200 when the PR exists, and the body is the PullRequest
404 when the PR doesn't exist

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions