Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 6 tasks
lchrennew opened this issue Jun 29, 2021 · 0 comments · Fixed by #29242
Closed
1 of 6 tasks

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

lchrennew opened this issue Jun 29, 2021 · 0 comments · Fixed by #29242
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@lchrennew
Copy link

  • 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

@a1012112796 a1012112796 added modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jul 4, 2021
6543 pushed a commit that referenced this issue Feb 26, 2024
Closes #16289

Add a new API `/repos/{owner}/{repo}/pulls/{base}/{head}` to get a PR by
its base and head branch.
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Feb 26, 2024
Closes go-gitea/gitea#16289

Add a new API `/repos/{owner}/{repo}/pulls/{base}/{head}` to get a PR by
its base and head branch.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants