| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 1 | gerrit test-submit rule |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 2 | ======================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6 | 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] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 10 | -- |
| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 11 | 'ssh' -p <port> <host> 'gerrit test-submit rule' |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 12 | [-s] |
| 13 | [--no-filters] |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 14 | CHANGE |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 15 | -- |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 16 | |
| 17 | DESCRIPTION |
| 18 | ----------- |
| 19 | Provides a way to test prolog link:prolog-cookbook.html[submit rules]. |
| 20 | |
| 21 | OPTIONS |
| 22 | ------- |
| 23 | -s:: |
| 24 | Reads a rules.pl file from stdin instead of rules.pl in refs/meta/config. |
| 25 | |
| 26 | --no-filters:: |
| 27 | Don't run the submit_filter/2 from the parent projects of the specified change. |
| 28 | |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 29 | ACCESS |
| 30 | ------ |
| 31 | Can be used by anyone that has permission to read the specified changeset. |
| 32 | |
| 33 | EXAMPLES |
| 34 | -------- |
| 35 | |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 36 | Test submit_rule from stdin and return the results as JSON. |
| 37 | ==== |
| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 38 | 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örk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 47 | ==== |
| 48 | |
| 49 | Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents. |
| 50 | ==== |
| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 51 | $ 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örk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 61 | ==== |
| 62 | |
| 63 | SCRIPTING |
| 64 | --------- |
| 65 | Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change. |
| 66 | |
| 67 | GERRIT |
| 68 | ------ |
| 69 | Part of link:index.html[Gerrit Code Review] |
| Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 70 | |
| 71 | SEARCHBOX |
| 72 | --------- |