-
Notifications
You must be signed in to change notification settings - Fork 360
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
cherry-pick a commit to a branch #5483
Changes from all commits
e53c71c
6a4987b
c97c207
eb23dfb
a37ec94
82102d0
b4cdee7
8998ec3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -474,6 +474,20 @@ components: | |
type: integer | ||
description: when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. | ||
|
||
CherryPickCreation: | ||
type: object | ||
required: | ||
- ref | ||
properties: | ||
ref: | ||
type: string | ||
description: the commit to cherry-pick, given by a ref | ||
parent_number: | ||
type: integer | ||
description: | | ||
when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. | ||
The destination branch is parent 1, which is the default behaviour. | ||
|
||
Commit: | ||
type: object | ||
required: | ||
|
@@ -2734,6 +2748,51 @@ paths: | |
default: | ||
$ref: "#/components/responses/ServerError" | ||
|
||
/repositories/{repository}/branches/{branch}/cherry-pick: | ||
parameters: | ||
- in: path | ||
name: repository | ||
required: true | ||
schema: | ||
type: string | ||
- in: path | ||
name: branch | ||
required: true | ||
schema: | ||
type: string | ||
post: | ||
tags: | ||
- branches | ||
operationId: cherryPick | ||
summary: Cherry-Pick the given reference commit into the given branch | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/CherryPickCreation" | ||
responses: | ||
201: | ||
description: the cherry-pick commit | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/Commit" | ||
400: | ||
$ref: "#/components/responses/ValidationError" | ||
401: | ||
$ref: "#/components/responses/Unauthorized" | ||
404: | ||
$ref: "#/components/responses/NotFound" | ||
409: | ||
description: Conflict Found | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/Error" | ||
Comment on lines
+2789
to
+2792
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not in this PR, but ideally we will return some detailed error indication of what conflicts we found. For a merge the caller can probably at least diff, here it will be harder. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, but differing this for now. #5507 |
||
default: | ||
$ref: "#/components/responses/ServerError" | ||
|
||
/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}: | ||
parameters: | ||
- in: path | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also have an optional message? (Can just be an issue for now.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5505