| 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 | -------- |
| 10 | [verse] |
| 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 |
| 15 | |
| 16 | DESCRIPTION |
| 17 | ----------- |
| 18 | Provides a way to test prolog link:prolog-cookbook.html[submit rules]. |
| 19 | |
| 20 | OPTIONS |
| 21 | ------- |
| 22 | -s:: |
| 23 | Reads a rules.pl file from stdin instead of rules.pl in refs/meta/config. |
| 24 | |
| 25 | --no-filters:: |
| 26 | Don't run the submit_filter/2 from the parent projects of the specified change. |
| 27 | |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 28 | ACCESS |
| 29 | ------ |
| 30 | Can be used by anyone that has permission to read the specified changeset. |
| 31 | |
| 32 | EXAMPLES |
| 33 | -------- |
| 34 | |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 35 | Test submit_rule from stdin and return the results as JSON. |
| 36 | ==== |
| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame^] | 37 | cat rules.pl | ssh -p 29418 review.example.com gerrit test-submit rule -s I78f2c6673db24e4e92ed32f604c960dc952437d9 |
| 38 | [ |
| 39 | { |
| 40 | "status": "NOT_READY", |
| 41 | "reject": { |
| 42 | "Any-Label-Name": {} |
| 43 | } |
| 44 | } |
| 45 | ] |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 46 | ==== |
| 47 | |
| 48 | Test the active submit_rule from the refs/meta/config branch, ignoring filters in the project parents. |
| 49 | ==== |
| Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame^] | 50 | $ ssh -p 29418 review.example.com gerrit test-submit rule I78f2c6673db24e4e92ed32f604c960dc952437d9 --no-filters |
| 51 | [ |
| 52 | { |
| 53 | "status": "NOT_READY", |
| 54 | "need": { |
| 55 | "Code-Review": {} |
| 56 | "Verified": {} |
| 57 | } |
| 58 | } |
| 59 | ] |
| Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 60 | ==== |
| 61 | |
| 62 | SCRIPTING |
| 63 | --------- |
| 64 | Can be used either interactively for testing new prolog submit rules, or from a script to check the submit status of a change. |
| 65 | |
| 66 | GERRIT |
| 67 | ------ |
| 68 | Part of link:index.html[Gerrit Code Review] |