blob: a9a1bc4b0d84ba3d62b9fa00b62a46c3cf24efbf [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= gerrit test-submit rule
Johan Björk20ae0692012-08-02 15:57:13 +02002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
Shawn Pearceb1f730b2013-03-04 07:54:09 -08004gerrit test-submit rule - Test prolog submit rules with a chosen changeset.
Johan Björk20ae0692012-08-02 15:57:13 +02005
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08007--
Shawn Pearceb1f730b2013-03-04 07:54:09 -08008'ssh' -p <port> <host> 'gerrit test-submit rule'
Johan Björk20ae0692012-08-02 15:57:13 +02009 [-s]
10 [--no-filters]
Johan Björk20ae0692012-08-02 15:57:13 +020011 CHANGE
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080012--
Johan Björk20ae0692012-08-02 15:57:13 +020013
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080014== DESCRIPTION
Johan Björk20ae0692012-08-02 15:57:13 +020015Provides a way to test prolog link:prolog-cookbook.html[submit rules].
16
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080017== OPTIONS
Johan Björk20ae0692012-08-02 15:57:13 +020018-s::
19 Reads a rules.pl file from stdin instead of rules.pl in refs/meta/config.
20
21--no-filters::
22 Don't run the submit_filter/2 from the parent projects of the specified change.
23
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080024== ACCESS
Johan Björk20ae0692012-08-02 15:57:13 +020025Can be used by anyone that has permission to read the specified changeset.
26
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080027== EXAMPLES
Johan Björk20ae0692012-08-02 15:57:13 +020028
Johan Björk20ae0692012-08-02 15:57:13 +020029Test submit_rule from stdin and return the results as JSON.
30====
Shawn Pearceb1f730b2013-03-04 07:54:09 -080031 cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
32 [
33 {
34 "status": "NOT_READY",
35 "reject": {
36 "Any-Label-Name": {}
37 }
38 }
39 ]
Johan Björk20ae0692012-08-02 15:57:13 +020040====
41
42Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents.
43====
Shawn Pearceb1f730b2013-03-04 07:54:09 -080044 $ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
45 [
46 {
47 "status": "NOT_READY",
48 "need": {
49 "Code-Review": {}
50 "Verified": {}
51 }
52 }
53 ]
Johan Björk20ae0692012-08-02 15:57:13 +020054====
55
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080056== SCRIPTING
Johan Björk20ae0692012-08-02 15:57:13 +020057Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change.
58
59GERRIT
60------
61Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070062
63SEARCHBOX
64---------