UNPKG

5.15 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 /** Commit to calculate the release to */
80 to?: string;
81 /** Override the version to release */
82 useVersion?: string;
83};
84export declare type ICommentOptions = DryRun & {
85 /** The message to use when commenting */
86 message?: string;
87 /** THe PR to comment on */
88 pr?: number;
89 /** The context the message should be attached to. Use to post multiple comments to a PR */
90 context?: string;
91 /** Delete the previous comment */
92 delete?: boolean;
93 /** Instead of deleting/adding a new comment. Just edit the old one */
94 edit?: boolean;
95};
96export declare type IPRBodyOptions = Omit<ICommentOptions, "edit" | "delete">;
97export declare type ILatestOptions = BaseBranch & DryRun & Partial<AuthorInformation> & Prerelease & NoVersionPrefix & ChangelogTitle & ChangelogMessage & Quiet & ReleaseCalculationOptions & {
98 /** Skip creating the changelog */
99 noChangelog?: boolean;
100};
101export declare type IShipItOptions = ILatestOptions & {
102 /**
103 * Make auto publish prerelease versions when merging to master.
104 * Only PRs merged with "release" label will generate a "latest" release.
105 * Only use this flag if you do not want to maintain a prerelease branch,
106 * and instead only want to use master.
107 */
108 onlyGraduateWithReleaseLabel?: boolean;
109};
110export declare type ICanaryOptions = Quiet & {
111 /** Do not actually do anything */
112 dryRun?: boolean;
113 /** THe PR to attach the canary to */
114 pr?: number;
115 /** The build to attach the canary to */
116 build?: number;
117 /** The message used when attaching the canary version to a PR */
118 message?: string | "false";
119 /** Always deploy a canary, even if the PR is marked as skip release */
120 force?: boolean;
121};
122export declare type INextOptions = Quiet & {
123 /** Do not actually do anything */
124 dryRun?: boolean;
125 /** The message used when attaching the prerelease version to a PR */
126 message?: string;
127};
128export interface IInfoOptions {
129 /** List some of the available plugins */
130 listPlugins?: boolean;
131}
132export declare type GlobalOptions = {
133 /** Plugins to initialize "auto" with */
134 plugins?: string[];
135} & Partial<GithubInformation & RepoInformation> & LogOptions;
136export declare type ApiOptions = GlobalOptions & (ILatestOptions | IInfoOptions | ICreateLabelsOptions | ILabelOptions | IPRCheckOptions | IPRStatusOptions | ICommentOptions | IChangelogOptions | IPRBodyOptions | IReleaseOptions | IVersionOptions | ICanaryOptions | IShipItOptions);
137export {};
138//# sourceMappingURL=auto-args.d.ts.map
\No newline at end of file