From cd7602a5a89e7a37062defa7697ad514a7f2d5de Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Wed, 22 May 2024 13:43:59 -0300 Subject: [PATCH] Add workflow conclusion enum --- src/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 29fba57..90a32f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,6 +34,13 @@ const FACT_IN_ACT = "in_act"; const FACT_IN_NAMESPACE_SO = "in_namespace_so"; const FACT_NIX_INSTALLER_PLANNER = "nix_installer_planner"; +type WorkflowConclusion = + | "success" + | "failure" + | "cancelled" + | "unavailable" + | "no-jobs"; + class NixInstallerAction extends DetSysAction { platform: string; nixPackageUrl: string | null; @@ -926,7 +933,7 @@ class NixInstallerAction extends DetSysAction { } private async getWorkflowConclusion(): Promise< - undefined | "success" | "failure" | "cancelled" | "unavailable" | "no-jobs" + undefined | WorkflowConclusion > { if (this.githubToken == null) { return undefined;