UNPKG

2.08 kBTypeScriptView Raw
1import { GitHubStatusContext } from "./GitHubContext";
2import { GoalEnvironment } from "./support/environment";
3/**
4 * Core data for a goal
5 */
6export interface GoalDefinition {
7 /**
8 * Must be unique among goals
9 * Should be camel case
10 */
11 uniqueName: string;
12 /**
13 * Optional environment for this goal to run in.
14 * This is meant to allow for logical grouping of goals from code, testing and production etc.
15 */
16 environment?: GoalEnvironment;
17 displayName?: string;
18 plannedDescription?: string;
19 requestedDescription?: string;
20 completedDescription?: string;
21 workingDescription?: string;
22 failedDescription?: string;
23 waitingForApprovalDescription?: string;
24 waitingForPreApprovalDescription?: string;
25 canceledDescription?: string;
26 stoppedDescription?: string;
27 skippedDescription?: string;
28 isolated?: boolean;
29 approvalRequired?: boolean;
30 preApprovalRequired?: boolean;
31 retryFeasible?: boolean;
32}
33/**
34 * Represents a delivery action, such as Build or Deploy.
35 */
36export declare class Goal {
37 readonly context: GitHubStatusContext;
38 readonly definition: GoalDefinition;
39 get environment(): string;
40 get successDescription(): string;
41 get inProcessDescription(): string;
42 get failureDescription(): string;
43 get plannedDescription(): string;
44 get requestedDescription(): string;
45 get waitingForApprovalDescription(): string;
46 get waitingForPreApprovalDescription(): string;
47 get canceledDescription(): string;
48 get stoppedDescription(): string;
49 get skippedDescription(): string;
50 get name(): string;
51 get uniqueName(): string;
52 constructor(definition: GoalDefinition);
53}
54export declare class GoalWithPrecondition extends Goal {
55 readonly dependsOn: Goal[];
56 constructor(definition: GoalDefinition, ...dependsOn: Goal[]);
57}
58export declare function isGoalDefinition(f: Goal | GoalDefinition): f is GoalDefinition;
59export declare function hasPreconditions(goal: Goal): goal is GoalWithPrecondition;
60//# sourceMappingURL=Goal.d.ts.map
\No newline at end of file