Skip to content

Commit

Permalink
Pull Requests: Add merge endpoint (#8228)
Browse files Browse the repository at this point in the history
* Pull Requests: Add merge endpoint

* Fix tests
  • Loading branch information
N-o-Z authored Sep 26, 2024
1 parent 28bf39e commit d42d757
Show file tree
Hide file tree
Showing 53 changed files with 2,912 additions and 43 deletions.
55 changes: 54 additions & 1 deletion api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,6 @@ components:
type: object
required:
- title
- description
- source_branch
- destination_branch
properties:
Expand Down Expand Up @@ -5804,6 +5803,59 @@ paths:
default:
$ref: "#/components/responses/ServerError"

/repositories/{repository}/pulls/{pull_request}/merge:
parameters:
- in: path
name: repository
required: true
schema:
type: string
- in: path
name: pull_request
required: true
description: pull request id
schema:
type: string
put:
tags:
- pulls
- experimental
operationId: mergePullRequest
summary: merge pull request
responses:
200:
description: merge completed
content:
application/json:
schema:
$ref: "#/components/schemas/MergeResult"
400:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
409:
description: |
Conflict
Deprecated: content schema will return Error format and not an empty MergeResult
content:
application/json:
schema:
$ref: "#/components/schemas/MergeResult"
412:
description: precondition failed (e.g. a pre-merge hook returned a failure)
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
420:
description: too many requests
default:
$ref: "#/components/responses/ServerError"

/healthcheck:
get:
operationId: healthCheck
Expand All @@ -5814,6 +5866,7 @@ paths:
responses:
204:
description: NoContent

/config:
get:
tags:
Expand Down
2 changes: 2 additions & 0 deletions clients/java-legacy/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 77 additions & 1 deletion clients/java-legacy/api/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 99 additions & 0 deletions clients/java-legacy/docs/ExperimentalApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/java-legacy/docs/PullRequestCreation.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d42d757

Please sign in to comment.