UNPKG

5.08 kBTypeScriptView Raw
1import { AuthorInformation, RepoInformation, GithubInformation, LogOptions, ReleaseCalculationOptions } from "./types";
2export interface ICreateLabelsOptions {
3 /** Do not actually do anything */
4 dryRun?: boolean;
5}
6export interface ILabelOptions {
7 /** PR to get the labels for */
8 pr?: number;
9}
10export interface IPRCheckOptions {
11 /** PR to check the label for */
12 pr?: number;
13 /** URL to attach to the checkmark */
14 url?: string;
15 /** The context the check should be attached to */
16 context?: string;
17 /** Do not actually do anything */
18 dryRun?: boolean;
19}
20export interface IPRStatusOptions {
21 /** The commit to attach a check to */
22 sha?: string;
23 /** The pr to attach a check to */
24 pr?: number;
25 /** URL to attach to the checkmark */
26 url: string;
27 /** The state to set the checkmark to */
28 state: "pending" | "success" | "error" | "failure";
29 /** The description to attach to the checkmark */
30 description: string;
31 /** The context the check should be attached to */
32 context: string;
33 /** Do not actually do anything */
34 dryRun?: boolean;
35}
36export declare type IVersionOptions = ReleaseCalculationOptions & {
37 /** Commit to start calculating the version from */
38 from?: string;
39};
40interface Quiet {
41 /** Print **only** the result of the command */
42 quiet?: boolean;
43}
44interface NoVersionPrefix {
45 /** Whether to prefix the version with a "v" */
46 noVersionPrefix?: boolean;
47}
48interface DryRun {
49 /** Do not actually do anything */
50 dryRun?: boolean;
51}
52interface ChangelogMessage {
53 /** The commit message to commit the changelog changes with */
54 message?: string;
55}
56interface ChangelogTitle {
57 /** Override the title use in the addition to the CHANGELOG.md. */
58 title?: string;
59}
60interface Prerelease {
61 /** Create a prerelease */
62 prerelease?: boolean;
63}
64interface BaseBranch {
65 /** The branch to treat as the base. Default is master */
66 baseBranch?: string;
67}
68export declare type IChangelogOptions = BaseBranch & ChangelogTitle & ChangelogMessage & Quiet & DryRun & NoVersionPrefix & Partial<AuthorInformation> & {
69 /** Commit to start calculating the changelog from */
70 from?: string;
71 /** Commit to start calculating the changelog to */
72 to?: string;
73 /** Don't commit the changelog */
74 noCommit?: boolean;
75};
76export declare type IReleaseOptions = BaseBranch & Prerelease & DryRun & NoVersionPrefix & Partial<AuthorInformation> & Partial<RepoInformation> & {
77 /** Commit to start calculating the release from */
78 from?: string;
79 /** Override the version to release */
80 useVersion?: string;
81};
82export declare type ICommentOptions = DryRun & {
83 /** The message to use when commenting */
84 message?: string;
85 /** THe PR to comment on */
86 pr?: number;
87 /** The context the message should be attached to. Use to post multiple comments to a PR */
88 context?: string;
89 /** Delete the previous comment */
90 delete?: boolean;
91 /** Instead of deleting/adding a new comment. Just edit the old one */
92 edit?: boolean;
93};
94export declare type IPRBodyOptions = Omit<ICommentOptions, "edit" | "delete">;
95export declare type ILatestOptions = BaseBranch & DryRun & Partial<AuthorInformation> & Prerelease & NoVersionPrefix & ChangelogTitle & ChangelogMessage & Quiet & ReleaseCalculationOptions & {
96 /** Skip creating the changelog */
97 noChangelog?: boolean;
98};
99export declare type IShipItOptions = ILatestOptions & {
100 /**
101 * Make auto publish prerelease versions when merging to master.
102 * Only PRs merged with "release" label will generate a "latest" release.
103 * Only use this flag if you do not want to maintain a prerelease branch,
104 * and instead only want to use master.
105 */
106 onlyGraduateWithReleaseLabel?: boolean;
107};
108export declare type ICanaryOptions = Quiet & {
109 /** Do not actually do anything */
110 dryRun?: boolean;
111 /** THe PR to attach the canary to */
112 pr?: number;
113 /** The build to attach the canary to */
114 build?: number;
115 /** The message used when attaching the canary version to a PR */
116 message?: string | "false";
117 /** Always deploy a canary, even if the PR is marked as skip release */
118 force?: boolean;
119};
120export declare type INextOptions = Quiet & {
121 /** Do not actually do anything */
122 dryRun?: boolean;
123 /** The message used when attaching the prerelease version to a PR */
124 message?: string;
125};
126export interface IInfoOptions {
127 /** List some of the available plugins */
128 listPlugins?: boolean;
129}
130export declare type GlobalOptions = {
131 /** Plugins to initialize "auto" with */
132 plugins?: string[];
133} & Partial<GithubInformation & RepoInformation> & LogOptions;
134export declare type ApiOptions = GlobalOptions & (ILatestOptions | IInfoOptions | ICreateLabelsOptions | ILabelOptions | IPRCheckOptions | IPRStatusOptions | ICommentOptions | IChangelogOptions | IPRBodyOptions | IReleaseOptions | IVersionOptions | ICanaryOptions | IShipItOptions);
135export {};
136//# sourceMappingURL=auto-args.d.ts.map
\No newline at end of file