forked from github-tools/github-release-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_options.js
More file actions
183 lines (181 loc) · 5.8 KB
/
_options.js
File metadata and controls
183 lines (181 loc) · 5.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
const chalk = require('chalk');
module.exports = {
changelogOptions: [
{
short: false,
name: false,
description: `\n${chalk.yellow('Changelog options')}\n\n`
},
{
short: '-G',
name: 'generate',
description:
'Generate the changelog with gren rather then using the repo releases'
},
{
short: '-f',
name: 'changelog-filename',
valueType: '<filename.md>',
description: 'The name of the changelog file. [CHANGELOG.md]',
defaultValue: 'CHANGELOG.md'
},
{
short: false,
name: false,
description: `\n\n${chalk.yellow('Release options')} \n${chalk.blue(
'(only applicable with the --generate option).'
)}\n\n`
}
],
globalOptions: [
{
short: '-u',
name: 'username',
valueType: '<repo owner>',
description: 'The username of the repo e.g. github-tools'
},
{
short: '-r',
name: 'repo',
valueType: '<repository name>',
description: 'The repository name e.g. github-release-notes'
},
{
short: '-T',
name: 'token',
valueType: '<github token>',
description: 'The token generated with repo access'
},
{
short: '-a',
name: 'api-url',
valueType: '<url>',
description:
'Override the GitHub API URL, allows gren to connect to a private GHE installation'
},
{
short: '-o',
name: 'override',
description: 'Override the release notes if exist'
},
{
short: '-B',
name: 'debug',
description: 'Run the command in debugging mode'
},
{
short: '-t',
name: 'tags',
valueType: '<new-tag>..<old-tag>',
description:
'Write release notes for <new-tag> using data collected until <old-tag>. If only one tag is specified, will use data until the previous tag. To run gren for all the tags, use --tags=all',
action: value => value.split('..')
},
{
short: '-l',
name: 'limit',
valueType: '<number>',
description:
'Just produce release notes for the <number> last releases.'
},
{
short: '-D',
name: 'data-source',
valueType: '<issues|commits|milestones|prs>',
description:
'The informations you want to use to build release notes. [issues]',
action: /^(issues|commits|milestones|prs)$/i,
defaultValue: 'issues'
},
{
short: '-N',
name: 'include-messages',
valueType: '<merge|commits|all>',
description:
'Filter the messages added to the release notes. Only used when --data-source used is commits [commits]',
action: /^(merge|commits|all)$/i,
defaultValue: 'commits'
},
{
short: '-i',
name: 'ignore-tags-with',
valueType: '<string1>,<string2>',
description:
'Ignore tags that contain one of the specified strings.',
action: value => value.split(',')
},
{
short: '-C',
name: 'ignore-commits-with',
valueType: '<string1>,<string2>',
description:
'Ignore commits that contain one of the specified strings.',
action: value => value.split(',')
},
{
short: '-p',
name: 'prefix',
valueType: '<name prefix>',
description: 'Add a prefix to the tag version. e.g. \'v\''
},
{
short: '-g',
name: 'group-by',
valueType: '<label>',
description:
'Group the issues using the labels as group headings. You can set custom headings for groups of labels from a configuration file.'
},
{
short: '-L',
name: 'ignore-labels',
valueType: '<label1>,<label2>',
description: 'Ignore the specified labels.',
action: value => value.split(',')
},
{
short: '-I',
name: 'ignore-issues-with',
valueType: '<label1>,<label2>',
description:
'Ignore issues that contains one of the specified labels.',
action: value => value.split(',')
},
{
short: '-M',
name: 'milestone-match',
valueType: '<prefix>',
description:
'The title that the script needs to match to link the release to the milestone. e.g. v will match v0.1.0 [Release {{tag_name}}]',
defaultValue: 'Release {{tag_name}}'
},
{
short: '-m',
name: 'only-milestones',
description:
'Add to the release bodies only the issues that have a milestone'
},
{
short: '-q',
name: 'quiet',
description: 'Run command without console logs.'
},
{
short: '-c',
name: 'config',
valueType: '<string>',
description: 'Specify a custom config filename'
}
],
releaseOptions: [
{
short: '-d',
name: 'draft',
description: 'Set the release notes as a draft.'
},
{
short: '-P',
name: 'prerelease',
description: 'Set the release as a prerelease.'
}
]
};