-
Notifications
You must be signed in to change notification settings - Fork 1
/
options.ts
89 lines (84 loc) · 2.04 KB
/
options.ts
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
import { Options } from 'yargs';
export interface CliParams {
auth?: boolean;
configuration?: string;
interactive?: boolean;
verbose?: boolean;
snapshot?: boolean;
issue?: number;
}
export const repoOptions: Record<string, Options> = {
auth: {
alias: 'a',
type: 'boolean',
description: 'Manual creadentials input',
},
repo: {
alias: 'r',
type: 'string',
description: 'Repo in format user/repo',
},
filter: {
alias: 'f',
type: 'string',
description: 'Filter to apply in Pull request query',
},
since: {
alias: 's',
type: 'string',
description: 'Start date in pull request filter query',
},
snapshot: {
type: 'boolean',
description: 'Generates snapshot release notes',
},
issue: {
type: 'number',
description: 'Issue number where release note preview will be published in a comment',
},
message: {
alias: 'm',
type: 'string',
description: 'Commit message',
},
publish: {
alias: 'p',
type: 'boolean',
description: 'Publish output to your repo',
},
};
export const configurationOptions: Record<string, Options> = {
configuration: {
alias: 'c',
type: 'string',
description: 'Configuration file path',
},
};
export const outputOptions: Record<string, Options> = {
output: {
alias: ['out', 'o'],
type: 'string',
description: 'Output path',
},
name: {
alias: 'n',
type: 'string',
description: 'Output file name',
},
};
export const commonOptions: Record<string, Options> = {
assets: {
type: 'string',
description: 'File to upload in publish process',
},
verbose: {
alias: 'v',
type: 'boolean',
description: 'Makes the script verbose',
},
interactive: {
alias: 'i',
type: 'boolean',
description: 'Executes interactive version of the script',
},
};