Skip to content

Commit

Permalink
allow changing commit data in cherry-pick and revert (#7865)
Browse files Browse the repository at this point in the history
* allow overriding commit-related data in cherry-pick

add commitOverrides to revert

* review fixes:

1. rename to snake_case
2. replace metadata instead of merging
3. add partial override and NPE tests
4. remove date from overrides
5. embed CommitOverrides in the relevant structs
  • Loading branch information
yonipeleg33 authored Jun 17, 2024
1 parent 33ee454 commit ce6d5f4
Show file tree
Hide file tree
Showing 54 changed files with 613 additions and 46 deletions.
16 changes: 16 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,18 @@ components:
type: boolean
default: false

CommitOverrides:
type: object
properties:
message:
type: string
description: replace the commit message
metadata:
type: object
description: replace the metadata of the commit
additionalProperties:
type: string

RevertCreation:
type: object
required:
Expand All @@ -477,6 +489,8 @@ components:
ref:
type: string
description: the commit to revert, given by a ref
commit_overrides:
$ref: "#/components/schemas/CommitOverrides"
parent_number:
type: integer
description: when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert.
Expand All @@ -501,6 +515,8 @@ components:
description: |
When cherry-picking a merge commit, the parent number (starting from 1) with which to perform the diff.
The default branch is parent 1.
commit_overrides:
$ref: "#/components/schemas/CommitOverrides"
force:
type: boolean
default: false
Expand Down
3 changes: 3 additions & 0 deletions clients/java-legacy/.openapi-generator/FILES

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

1 change: 1 addition & 0 deletions clients/java-legacy/README.md

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

27 changes: 27 additions & 0 deletions clients/java-legacy/api/openapi.yaml

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

1 change: 1 addition & 0 deletions clients/java-legacy/docs/CherryPickCreation.md

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

1 change: 1 addition & 0 deletions clients/java-legacy/docs/RevertCreation.md

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.

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

1 change: 1 addition & 0 deletions clients/java/README.md

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

27 changes: 27 additions & 0 deletions clients/java/api/openapi.yaml

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

Loading

0 comments on commit ce6d5f4

Please sign in to comment.