fix: property access

This commit is contained in:
peaceiris 2020-03-14 22:09:05 +00:00
parent a8a9c90a27
commit 72f58a06cf
2 changed files with 5 additions and 6 deletions

View File

@ -12,9 +12,8 @@ export async function run(): Promise<void> {
const inps: Inputs = getInputs();
showInputs(inps);
const isForkRepository =
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(context.payload as any).repository.fork === 'true';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isForkRepository = (context.payload as any).repository.fork;
const isSkipOnFork = await skipOnFork(
isForkRepository,
inps.GithubToken,
@ -22,6 +21,9 @@ export async function run(): Promise<void> {
inps.PersonalToken
);
if (isSkipOnFork) {
core.warning(
'Action runs on fork and deploy_key or personal_token is empty, Skip deployment'
);
return;
}

View File

@ -75,9 +75,6 @@ export async function skipOnFork(
}
if (deployKey === '' && personalToken === '') {
core.warning(
'Action runs on fork and deploy_key or personal_token is empty'
);
return true;
}
}