UNPKG

2.84 kBTypeScriptView Raw
1export default function parseArgs(testArgs?: string[]): ({
2 command: string;
3 githubApi?: string | undefined;
4 baseBranch?: string | undefined;
5 githubGraphqlApi?: string | undefined;
6 plugins?: string[] | undefined;
7} & IRepoArgs & ILogArgs & ICreateLabelsCommandOptions) | ({
8 command: string;
9 githubApi?: string | undefined;
10 baseBranch?: string | undefined;
11 githubGraphqlApi?: string | undefined;
12 plugins?: string[] | undefined;
13} & IRepoArgs & ILogArgs & ILabelCommandOptions) | ({
14 command: string;
15 githubApi?: string | undefined;
16 baseBranch?: string | undefined;
17 githubGraphqlApi?: string | undefined;
18 plugins?: string[] | undefined;
19} & IRepoArgs & ILogArgs & IVersionCommandOptions) | undefined;
20interface IAuthorArgs {
21 name?: string;
22 email?: string;
23}
24interface IRepoArgs {
25 owner?: string;
26 repo?: string;
27}
28interface ILogArgs {
29 verbose?: boolean;
30 veryVerbose?: boolean;
31}
32export interface IInitCommandOptions {
33 onlyLabels?: boolean;
34 dryRun?: boolean;
35}
36export interface ICreateLabelsCommandOptions {
37 dryRun?: boolean;
38}
39export interface ILabelCommandOptions {
40 pr?: number;
41}
42export interface IPRCheckCommandOptions {
43 pr?: number;
44 url?: string;
45 skipReleaseLabels?: string[];
46 context?: string;
47 dryRun?: boolean;
48}
49export interface IPRCommandOptions {
50 sha?: string;
51 pr?: number;
52 url: string;
53 state: 'pending' | 'success' | 'error' | 'failure';
54 description: string;
55 context: string;
56 dryRun?: boolean;
57}
58export interface IVersionCommandOptions {
59 skipReleaseLabels?: string[];
60 onlyPublishWithReleaseLabel?: boolean;
61}
62export interface IChangelogOptions extends IAuthorArgs {
63 noVersionPrefix?: boolean;
64 jira?: string;
65 dryRun?: boolean;
66 from?: string;
67 to?: string;
68 message?: string;
69}
70export interface IReleaseCommandOptions extends IAuthorArgs {
71 noVersionPrefix?: boolean;
72 jira?: string;
73 dryRun?: boolean;
74 useVersion?: string;
75 slack?: string;
76}
77export interface ICommentCommandOptions {
78 message: string;
79 pr?: number;
80 context?: string;
81 dryRun?: boolean;
82}
83export interface IShipItCommandOptions {
84 dryRun?: boolean;
85 slack?: string;
86}
87export interface ICanaryCommandOptions {
88 dryRun?: boolean;
89 pr?: number;
90 build?: number;
91 message?: string | 'false';
92}
93declare type GlobalFlags = {
94 command: string;
95 githubApi?: string;
96 baseBranch?: string;
97 githubGraphqlApi?: string;
98 plugins?: string[];
99} & IRepoArgs & ILogArgs;
100export declare type ArgsType = GlobalFlags & (IInitCommandOptions | ICreateLabelsCommandOptions | ILabelCommandOptions | IPRCheckCommandOptions | IPRCommandOptions | ICommentCommandOptions | IReleaseCommandOptions | IVersionCommandOptions | IShipItCommandOptions);
101export {};