diff --git a/status-checks/index.ts b/status-checks/index.ts index e3c91c00..b31cbb56 100644 --- a/status-checks/index.ts +++ b/status-checks/index.ts @@ -3,7 +3,7 @@ import fetch from "node-fetch"; import checks from "./checks"; -const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); +const [owner, repo] = String(process.env.GITHUB_REPOSITORY).split("/"); function getCurrentCommitSha() { return cp @@ -45,7 +45,7 @@ async function setStatus(context: any, state: string, description: string) { try { const response = await callback(); await setStatus(name, "success", response); - } catch (err) { + } catch (err: any) { const message = err ? err.message : "Something went wrong"; await setStatus(name, "failure", message); }