Skip to content

Commit

Permalink
fix: property access
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Mar 14, 2020
1 parent a8a9c90 commit 72f58a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ 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,
inps.DeployKey,
inps.PersonalToken
);
if (isSkipOnFork) {
core.warning(
'Action runs on fork and deploy_key or personal_token is empty, Skip deployment'
);
return;
}

Expand Down
3 changes: 0 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 72f58a0

Please sign in to comment.