UNPKG

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