Rebase: Allow to specify options for the commit validation
When a change / patch set is created by pushing a commit for review it
is possible to specify push options. These push options are forwarded to
the commit validation listeners. This enables the commit validation
listeners to skip the validation if a certain push option was set (also
see change If9d82a37c). Push options to skip certain commit validations
are for example supported by the uploadvalidator plugin and the
code-owners plugin.
With this change we allow callers of the Rebase REST endpoint to set
validation options in the CherryPickInput that are forwarded as push
options to the commit validation listeners. This way commit validation
can also be skipped when creating a patch set via the Rebase REST
endpoint.
The same is already possible for the Create Change REST endpoint (see
change I936a8b6d6) and the Cherry Pick Revision REST endpoint (see
change I66dc4cfda).
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: If025ac25310d0c46eb34ecdd2e85eea17aef8063
Release-Notes: Add support for specifying validation options in Rebase REST endpoint
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index 66b3645..7c478ae 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -7653,20 +7653,28 @@
[options="header",cols="1,^1,5"]
|===========================
-|Field Name ||Description
-|`base` |optional|
+|Field Name ||Description
+|`base` |optional|
The new parent revision. This can be a ref or a SHA-1 to a concrete patchset. +
Alternatively, a change number can be specified, in which case the current
patch set is inferred. +
Empty string is used for rebasing directly on top of the target branch,
which effectively breaks dependency towards a parent change.
-|`allow_conflicts`|optional, defaults to false|
+|`allow_conflicts` |optional, defaults to false|
If `true`, the rebase also succeeds if there are conflicts. +
If there are conflicts the file contents of the rebased patch set contain
git conflict markers to indicate the conflicts. +
Callers can find out whether there were conflicts by checking the
`contains_git_conflicts` field in the returned link:#change-info[ChangeInfo]. +
If there are conflicts the change is marked as work-in-progress.
+|`validation_options`|optional|
+Map with key-value pairs that are forwarded as options to the commit validation
+listeners (e.g. can be used to skip certain validations). Which validation
+options are supported depends on the installed commit validation listeners.
+Gerrit core doesn't support any validation options, but commit validation
+listeners that are implemented in plugins may. Please refer to the
+documentation of the installed plugins to learn whether they support validation
+options. Unknown validation options are silently ignored.
|===========================
[[related-change-and-commit-info]]