@factorialco/gat 1.1.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -89,4 +89,4 @@ TODO
89
89
 
90
90
  ## License
91
91
 
92
- TODO
92
+ MIT
package/dist/event.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export declare type EventName = "push" | "pull_request" | "pull_request_review" | "workflow_run" | "workflow_dispatch" | "schedule" | "pull_request_target";
2
- export declare type EventOptions<T extends EventName> = T extends "push" ? PushEventOptions : T extends "pull_request" ? PullRequestEventOptions : T extends "pull_request_review" ? PullRequestReviewEventOptions : T extends "workflow_run" ? WorkflowRunEventOptions : T extends "workflow_dispatch" ? WorkflowDispatchEventOptions : T extends "schedule" ? ScheduleEventOptions : never;
1
+ export declare type EventName = "push" | "pull_request" | "pull_request_review" | "workflow_run" | "workflow_dispatch" | "schedule" | "pull_request_target" | "merge_group";
2
+ export declare type EventOptions<T extends EventName> = T extends "push" ? PushEventOptions : T extends "pull_request" ? PullRequestEventOptions : T extends "pull_request_review" ? PullRequestReviewEventOptions : T extends "workflow_run" ? WorkflowRunEventOptions : T extends "workflow_dispatch" ? WorkflowDispatchEventOptions : T extends "schedule" ? ScheduleEventOptions : T extends "merge_group" ? MergeGroupEventOptions : never;
3
3
  interface PushEventOptions {
4
4
  branches?: string[];
5
5
  paths?: string[];
@@ -15,6 +15,7 @@ interface PullRequestReviewEventOptions {
15
15
  interface WorkflowRunEventOptions {
16
16
  workflows?: string[];
17
17
  types?: Array<"completed">;
18
+ branches?: string[];
18
19
  }
19
20
  interface WorkflowDispatchInput {
20
21
  description: string;
@@ -29,6 +30,9 @@ interface WorkflowDispatchEventOptions {
29
30
  declare type ScheduleEventOptions = Array<{
30
31
  cron: string;
31
32
  }>;
33
+ interface MergeGroupEventOptions {
34
+ types?: Array<"checks_requested">;
35
+ }
32
36
  export interface Event {
33
37
  name: EventName;
34
38
  options?: EventOptions<EventName>;
package/dist/step.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface BaseStep {
5
5
  ifExpression?: string;
6
6
  workingDirectory?: string;
7
7
  continueOnError?: boolean;
8
+ timeout?: number;
8
9
  }
9
10
  export declare type Step = RunStep | UseStep;
10
11
  export interface RunStep extends BaseStep {
package/dist/workflow.js CHANGED
@@ -96,12 +96,13 @@ class Workflow {
96
96
  },
97
97
  }
98
98
  : undefined,
99
- steps: steps.map(({ id, name, ifExpression, workingDirectory, continueOnError, ...options }) => ({
99
+ steps: steps.map(({ id, name, ifExpression, workingDirectory, continueOnError, timeout, ...options }) => ({
100
100
  id,
101
101
  name,
102
102
  if: ifExpression,
103
103
  "continue-on-error": continueOnError,
104
104
  "working-directory": workingDirectory,
105
+ "timeout-minutes": timeout,
105
106
  ...options,
106
107
  })),
107
108
  outputs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "Write your GitHub Actions workflows using TypeScript",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"