blob: d75b21a223a443624ba1c6c28b7bb0ff4d6a23f7 [file] [log] [blame]
Shawn Pearceb1f730b2013-03-04 07:54:09 -08001gerrit test-submit rule
Johan Björk20ae0692012-08-02 15:57:13 +02002=======================
3
4NAME
5----
Shawn Pearceb1f730b2013-03-04 07:54:09 -08006gerrit test-submit rule - Test prolog submit rules with a chosen changeset.
Johan Björk20ae0692012-08-02 15:57:13 +02007
8SYNOPSIS
9--------
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080010--
Shawn Pearceb1f730b2013-03-04 07:54:09 -080011'ssh' -p <port> <host> 'gerrit test-submit rule'
Johan Björk20ae0692012-08-02 15:57:13 +020012 [-s]
13 [--no-filters]
Johan Björk20ae0692012-08-02 15:57:13 +020014 CHANGE
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080015--
Johan Björk20ae0692012-08-02 15:57:13 +020016
17DESCRIPTION
18-----------
19Provides a way to test prolog link:prolog-cookbook.html[submit rules].
20
21OPTIONS
22-------
23-s::
24Reads a rules.pl file from stdin instead of rules.pl in refs/meta/config.
25
26--no-filters::
27Don't run the submit_filter/2 from the parent projects of the specified change.
28
Johan Björk20ae0692012-08-02 15:57:13 +020029ACCESS
30------
31Can be used by anyone that has permission to read the specified changeset.
32
33EXAMPLES
34--------
35
Johan Björk20ae0692012-08-02 15:57:13 +020036Test submit_rule from stdin and return the results as JSON.
37====
Shawn Pearceb1f730b2013-03-04 07:54:09 -080038 cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
39 [
40 {
41 "status": "NOT_READY",
42 "reject": {
43 "Any-Label-Name": {}
44 }
45 }
46 ]
Johan Björk20ae0692012-08-02 15:57:13 +020047====
48
49Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents.
50====
Shawn Pearceb1f730b2013-03-04 07:54:09 -080051 $ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
52 [
53 {
54 "status": "NOT_READY",
55 "need": {
56 "Code-Review": {}
57 "Verified": {}
58 }
59 }
60 ]
Johan Björk20ae0692012-08-02 15:57:13 +020061====
62
63SCRIPTING
64---------
65Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change.
66
67GERRIT
68------
69Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070070
71SEARCHBOX
72---------