fixed index.ts errors

This commit is contained in:
pradyuman-verma 2022-03-03 22:28:59 +05:30
parent 8936c7958b
commit 054ccf2f4f
No known key found for this signature in database
GPG Key ID: E36FD6BC8923221F

View File

@ -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);
}