forked from forgejo/forgejo
Add API to get PR by base/head (#29242)
Closes https://github.com/go-gitea/gitea/issues/16289 Add a new API `/repos/{owner}/{repo}/pulls/{base}/{head}` to get a PR by its base and head branch.
This commit is contained in:
parent
dc825acb33
commit
feb189554e
5 changed files with 186 additions and 0 deletions
50
templates/swagger/v1_json.tmpl
generated
50
templates/swagger/v1_json.tmpl
generated
|
@ -10769,6 +10769,56 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/pulls/{base}/{head}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Get a pull request by base and head",
|
||||
"operationId": "repoGetPullRequestByBaseHead",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "base of the pull request to get",
|
||||
"name": "base",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "head of the pull request to get",
|
||||
"name": "head",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/PullRequest"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/pulls/{index}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue