UNPKG

4.85 kBTypeScriptView Raw
1export interface IAuthorOptions {
2 /** Author's name */
3 name?: string;
4 /** Author's email */
5 email?: string;
6}
7export interface IRepoOptions {
8 /** Github repo owner (user) */
9 owner?: string;
10 /** GitHub project to operate on */
11 repo?: string;
12}
13export interface ILogOptions {
14 /** Show more logs */
15 verbose?: boolean | boolean[];
16}
17export interface IInitOptions {
18 /** Only show prompts for creating labels */
19 onlyLabels?: boolean;
20 /** Do not actually do anything */
21 dryRun?: boolean;
22}
23export interface ICreateLabelsOptions {
24 /** Do not actually do anything */
25 dryRun?: boolean;
26}
27export interface ILabelOptions {
28 /** PR to get the labels for */
29 pr?: number;
30}
31export interface IPRCheckOptions {
32 /** PR to check the label for */
33 pr?: number;
34 /** URL to attach to the checkmark */
35 url?: string;
36 /** The context the check should be attached to */
37 context?: string;
38 /** Do not actually do anything */
39 dryRun?: boolean;
40}
41export interface IPRStatusOptions {
42 /** The commit to attach a check to */
43 sha?: string;
44 /** The pr to attach a check to */
45 pr?: number;
46 /** URL to attach to the checkmark */
47 url: string;
48 /** The state to set the checkmark to */
49 state: 'pending' | 'success' | 'error' | 'failure';
50 /** The description to attach to the checkmark */
51 description: string;
52 /** The context the check should be attached to */
53 context: string;
54 /** Do not actually do anything */
55 dryRun?: boolean;
56}
57export interface IVersionOptions {
58 /** Instead of publishing every PR only publish when "release" label is present */
59 onlyPublishWithReleaseLabel?: boolean;
60 /** Commit to start calculating the version from */
61 from?: string;
62}
63export interface IChangelogOptions extends IAuthorOptions {
64 /** Whether to prefix the version with a "v" */
65 noVersionPrefix?: boolean;
66 /** Do not actually do anything */
67 dryRun?: boolean;
68 /** Commit to start calculating the changelog from */
69 from?: string;
70 /** Commit to start calculating the changelog to */
71 to?: string;
72 /** The commit message to commit the changelog changes with */
73 message?: string;
74}
75export interface IReleaseOptions extends IAuthorOptions {
76 /** Whether to prefix the version with a "v" */
77 noVersionPrefix?: boolean;
78 /** Do not actually do anything */
79 dryRun?: boolean;
80 /** Commit to start calculating the release from */
81 from?: string;
82 /** Override the version to release */
83 useVersion?: string;
84 /** Create a prerelease */
85 prerelease?: boolean;
86}
87export interface ICommentOptions {
88 /** The message to use when commenting */
89 message?: string;
90 /** THe PR to comment on */
91 pr?: number;
92 /** The context the message should be attached to. Use to post multiple comments to a PR */
93 context?: string;
94 /** Do not actually do anything */
95 dryRun?: boolean;
96 /** Delete the previous comment */
97 delete?: boolean;
98 /** Instead of deleting/adding a new comment. Just edit the old one */
99 edit?: boolean;
100}
101export declare type IPRBodyOptions = ICommentOptions;
102export interface IShipItOptions {
103 /** Do not actually do anything */
104 dryRun?: boolean;
105 /**
106 * Make auto publish prerelease versions when merging to master.
107 * Only PRs merged with "release" label will generate a "latest" release.
108 * Only use this flag if you do not want to maintain a prerelease branch,
109 * and instead only want to use master.
110 */
111 onlyGraduateWithReleaseLabel?: boolean;
112}
113export interface ICanaryOptions {
114 /** Do not actually do anything */
115 dryRun?: boolean;
116 /** THe PR to attach the canary to */
117 pr?: number;
118 /** The build to attach the canary to */
119 build?: number;
120 /** The message used when attaching the canary version to a PR */
121 message?: string | 'false';
122}
123export interface INextOptions {
124 /** Do not actually do anything */
125 dryRun?: boolean;
126 /** The message used when attaching the prerelease version to a PR */
127 message?: string;
128}
129export declare type GlobalOptions = {
130 /** The GitHub api to communicate with through octokit */
131 githubApi?: string;
132 /** The branch that is used as the base. defaults to master */
133 baseBranch?: string;
134 /** The GitHub graphql api to communicate with through octokit */
135 githubGraphqlApi?: string;
136 /** Plugins to initialize "auto" with */
137 plugins?: string[];
138} & IRepoOptions & ILogOptions;
139export declare type ApiOptions = GlobalOptions & (IInitOptions | ICreateLabelsOptions | ILabelOptions | IPRCheckOptions | IPRStatusOptions | ICommentOptions | IChangelogOptions | IPRBodyOptions | IReleaseOptions | IVersionOptions | ICanaryOptions | IShipItOptions);
140//# sourceMappingURL=auto-args.d.ts.map
\No newline at end of file