blob: 33cf2ea59473c2c9d3867dda56b820a557ea1471 [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
Michael Ochmanne2d76a12016-06-23 17:07:37 +02007[verse]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08008--
Michael Ochmanne2d76a12016-06-23 17:07:37 +02009_ssh_ -p <port> <host> _gerrit test-submit_ rule
Johan Björk20ae0692012-08-02 15:57:13 +020010 [-s]
11 [--no-filters]
Johan Björk20ae0692012-08-02 15:57:13 +020012 CHANGE
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080013--
Johan Björk20ae0692012-08-02 15:57:13 +020014
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080015== DESCRIPTION
Johan Björk20ae0692012-08-02 15:57:13 +020016Provides a way to test prolog link:prolog-cookbook.html[submit rules].
17
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080018== OPTIONS
Johan Björk20ae0692012-08-02 15:57:13 +020019-s::
20 Reads a rules.pl file from stdin instead of rules.pl in refs/meta/config.
21
22--no-filters::
23 Don't run the submit_filter/2 from the parent projects of the specified change.
24
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080025== ACCESS
Johan Björk20ae0692012-08-02 15:57:13 +020026Can be used by anyone that has permission to read the specified changeset.
27
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080028== EXAMPLES
Johan Björk20ae0692012-08-02 15:57:13 +020029
Johan Björk20ae0692012-08-02 15:57:13 +020030Test submit_rule from stdin and return the results as JSON.
Michael Ochmannb99feab2016-07-06 14:10:22 +020031----
David Shevitzc47f2362018-09-27 10:55:35 -070032cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9
33[
34 {
35 "status": "NOT_READY",
36 "reject": {
37 "Any-Label-Name": {}
38 }
39 }
40]
Michael Ochmannb99feab2016-07-06 14:10:22 +020041----
Johan Björk20ae0692012-08-02 15:57:13 +020042
43Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents.
Michael Ochmannb99feab2016-07-06 14:10:22 +020044----
David Shevitzc47f2362018-09-27 10:55:35 -070045$ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters
46[
47 {
48 "status": "NOT_READY",
49 "need": {
50 "Code-Review": {}
51 "Verified": {}
52 }
53 }
54]
Michael Ochmannb99feab2016-07-06 14:10:22 +020055----
Johan Björk20ae0692012-08-02 15:57:13 +020056
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080057== SCRIPTING
Johan Björk20ae0692012-08-02 15:57:13 +020058Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change.
59
60GERRIT
61------
62Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070063
64SEARCHBOX
65---------