|
| 1 | +// TODO: write test to check whether there are any duplicates (short or name) |
| 2 | +export const options = [ |
| 3 | + { |
| 4 | + short: '-u', |
| 5 | + name: 'username', |
| 6 | + valueType: '<repo owner>', |
| 7 | + description: 'The username of the repo e.g. github-tools' |
| 8 | + }, |
| 9 | + { |
| 10 | + short: '-r', |
| 11 | + name: 'repo', |
| 12 | + valueType: '<repository name>', |
| 13 | + description: 'The repository name e.g. github-release-notes' |
| 14 | + }, |
| 15 | + { |
| 16 | + short: '-T', |
| 17 | + name: 'token', |
| 18 | + valueType: '<github token>', |
| 19 | + description: 'The token generated with repo access' |
| 20 | + }, |
| 21 | + { |
| 22 | + short: '-au', |
| 23 | + name: 'api-url', |
| 24 | + valueType: '<url>', |
| 25 | + description: 'Override the GitHub API URL, allows gren to connect to a private GHE installation' |
| 26 | + }, |
| 27 | + { |
| 28 | + short: '-o', |
| 29 | + name: 'override', |
| 30 | + description: 'Override the release notes if exist.' |
| 31 | + }, |
| 32 | + { |
| 33 | + short: '-t', |
| 34 | + name: 'tags', |
| 35 | + valueType: '<old-tag>..<new-tag>', |
| 36 | + description: 'Write release notes for a range of tags, a specific tag or all. e.g. 0.2.0..0.1.0 or 0.2.0.. or ..0.1.0 or 0.2.0 or *', // needs to be documented better, |
| 37 | + action: value => value.split('..') |
| 38 | + }, |
| 39 | + { |
| 40 | + short: '-D', |
| 41 | + name: 'data-source', |
| 42 | + valueType: '<source>', |
| 43 | + description: 'The informations you want to use to build release notes.', |
| 44 | + action: /^(issues|commits|milestones)$/i, |
| 45 | + defaultValue: 'issues' |
| 46 | + }, |
| 47 | + { |
| 48 | + short: '-im', |
| 49 | + name: 'include-messages', |
| 50 | + valueType: '<merge|commits|all>', |
| 51 | + description: 'Filter the messages added to the release notes. Only used when --data-source used is commits', |
| 52 | + action: /^(merge|commits|all)$/i, |
| 53 | + defaultValue: 'commits' |
| 54 | + }, |
| 55 | + { |
| 56 | + short: '-p', |
| 57 | + name: 'prefix', |
| 58 | + valueType: '<name prefix>', |
| 59 | + description: 'Add a prefix to the tag version. e.g. \'v\'' |
| 60 | + }, |
| 61 | + { |
| 62 | + short: '-d', |
| 63 | + name: 'draft', |
| 64 | + description: 'Set the release as a draft.' |
| 65 | + }, |
| 66 | + { |
| 67 | + short: '-pr', |
| 68 | + name: 'prerelease', |
| 69 | + description: 'Set the release as a prerelease.' |
| 70 | + }, |
| 71 | + { |
| 72 | + short: '-g', |
| 73 | + name: 'group-by', |
| 74 | + valueType: '<"label"|Object>', |
| 75 | + description: 'Group the issues using the labels as group headings. You can set custom headings for groups of labels from a configuration file.' |
| 76 | + }, |
| 77 | + { |
| 78 | + short: '-L', |
| 79 | + name: 'ignore-labels', |
| 80 | + valueType: '<label1>,<label2>,<label3>', |
| 81 | + description: 'Ignore the specified labels.', |
| 82 | + action: value => value.split(',') |
| 83 | + }, |
| 84 | + { |
| 85 | + short: '-I', |
| 86 | + name: 'ignore-issues-with', |
| 87 | + valueType: '<label1>,<label2>,<label3>', |
| 88 | + description: 'Ignore issues that contains one of the specified labels.', |
| 89 | + action: value => value.split(',') |
| 90 | + }, |
| 91 | + { |
| 92 | + short: '-mm', |
| 93 | + name: 'milestone-match', |
| 94 | + valueType: '<prefix>', |
| 95 | + description: 'The title that the script needs to match to link the release to the milestone. e.g. v will match v0.1.0' |
| 96 | + }, |
| 97 | + { |
| 98 | + short: '-M', |
| 99 | + name: 'only-milestones', |
| 100 | + description: 'Add to the release bodies only the issues that have a milestone' |
| 101 | + } |
| 102 | +]; |
0 commit comments