Add extension point to register push options Unknown push options are rejected by Gerrit. With the new extension point plugins can register push options that Gerrit will accept. Push options are accessible from the CommitValidationListener. This is where plugins can check if their custom push option was set and react to it. A possible use-case is to define a push options that skips the validation that is performed by the plugin. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I27235de3156c02d8d0a97db72fd0861977b484a0
diff --git a/Documentation/config-validation.txt b/Documentation/config-validation.txt index cb953c1..56c9ecd 100644 --- a/Documentation/config-validation.txt +++ b/Documentation/config-validation.txt
@@ -21,6 +21,14 @@ Out of the box, Gerrit includes a plugin that checks the length of the subject and body lines of commit messages on uploaded commits. +[plugin-push-options]] +=== Plugin push options + +Plugins can register push options by implementing the `PluginPushOption` +interface. If a plugin push option was specified it is available from +the `CommitReceivedEvent` that is passed into `CommitValidationListener`. +This way the plugin commit validation can be controlled by push options. + [[user-ref-operations-validation]] == User ref operations validation