gerrit/Documentation/config-validation.txt
Edwin Kempin 42b7b4e61d Add extension point to allow plugins to validate group creation
By implementing this extension point plugins can validate the creation
of new groups based on input arguments. E.g. a plugin could enforce
a certain name scheme for the group names.

To match the extension point for validating project creations a
CreateGroupArgs class was added that contains the arguments for the
group creation.

Change-Id: Id5a5909028d57ce588ed8b17d9435958d37668c1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-01-24 11:15:33 +01:00

65 lines
1.7 KiB
Plaintext

= Gerrit Code Review - Commit Validation
Gerrit supports link:dev-plugins.html[plugin-based] validation of
commits.
[[new-commit-validation]]
== New commit validation
Plugins implementing the `CommitValidationListener` interface can
perform additional validation checks against new commits.
If the commit fails the validation, the plugin can either provide a
message that will be sent back to the git client, or throw an exception
which will cause the commit to be rejected.
Validation applies to both commits uploaded via `git push`, and new
commits generated via Gerrit's Web UI features such as the rebase, revert
and cherry-pick buttons.
Out of the box, Gerrit includes a plugin that checks the length of the
subject and body lines of commit messages on uploaded commits.
[[pre-merge-validation]]
== Pre-merge validation
Plugins implementing the `MergeValidationListener` interface can
perform additional validation checks against commits before they
are merged to the git repository.
If the commit fails the validation, the plugin can throw an exception
which will cause the merge to fail.
[[new-project-validation]]
== New project validation
Plugins implementing the `ProjectCreationValidationListener` interface
can perform additional validation on project creation based on the
input arguments.
E.g. a plugin could use this to enforce a certain name scheme for
project names.
[[new-group-validation]]
== New group validation
Plugins implementing the `GroupCreationValidationListener` interface
can perform additional validation on group creation based on the
input arguments.
E.g. a plugin could use this to enforce a certain name scheme for
group names.
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------