Files
gerrit/Documentation/cmd-test-submit-rule.txt
Michael Ochmann e2d76a1c23 Fix broken synopsis formatting in documentation
Most of the cmd-xxxx.txt pages were still using the legacy 'italics'
asciidoc [1], which caused the synopsis sections to render like this:

'ssh' -p <port> 'gerrit some-command'

Furthermore, the line breaks and indentations were not rendered.

Replaced the legacy 'italics" with _italics_ in all synopsis sections
and changed the block type to [verse]. Verse blocks preserve indents
and line breaks (like <pre> in HTML), but still allow text formatting.

Fixed also some other minor mistakes and formatting errors.

[1] http://asciidoctor.org/docs/migration/#migration-cheatsheet

Change-Id: I457c5e42e3758789f29541d38d6f6c2e25532897
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
2016-07-06 10:54:42 +02:00

66 lines
1.4 KiB
Plaintext

= gerrit test-submit rule
== NAME
gerrit test-submit rule - Test prolog submit rules with a chosen changeset.
== SYNOPSIS
[verse]
--
_ssh_ -p <port> <host> _gerrit test-submit_ rule
[-s]
[--no-filters]
CHANGE
--
== DESCRIPTION
Provides a way to test prolog link:prolog-cookbook.html[submit rules].
== OPTIONS
-s::
Reads a rules.pl file from stdin instead of rules.pl in refs/meta/config.
--no-filters::
Don't run the submit_filter/2 from the parent projects of the specified change.
== ACCESS
Can be used by anyone that has permission to read the specified changeset.
== EXAMPLES
Test submit_rule from stdin and return the results as JSON.
====
cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
[
{
"status": "NOT_READY",
"reject": {
"Any-Label-Name": {}
}
}
]
====
Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents.
====
$ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
[
{
"status": "NOT_READY",
"need": {
"Code-Review": {}
"Verified": {}
}
}
]
====
== SCRIPTING
Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change.
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------