Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = gerrit test-submit rule |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4 | gerrit test-submit rule - Test prolog submit rules with a chosen changeset. |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 7 | [verse] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 8 | -- |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 9 | _ssh_ -p <port> <host> _gerrit test-submit_ rule |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 10 | [-s] |
| 11 | [--no-filters] |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 12 | CHANGE |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 13 | -- |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 14 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 15 | == DESCRIPTION |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 16 | Provides a way to test prolog link:prolog-cookbook.html[submit rules]. |
| 17 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 18 | == OPTIONS |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 19 | -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' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 25 | == ACCESS |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 26 | Can be used by anyone that has permission to read the specified changeset. |
| 27 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 28 | == EXAMPLES |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 29 | |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 30 | Test submit_rule from stdin and return the results as JSON. |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 31 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 32 | cat 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 Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 41 | ---- |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 42 | |
| 43 | Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents. |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 44 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 45 | $ 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 Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 55 | ---- |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 56 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 57 | == SCRIPTING |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 58 | Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change. |
| 59 | |
| 60 | GERRIT |
| 61 | ------ |
| 62 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 63 | |
| 64 | SEARCHBOX |
| 65 | --------- |