Skip to content

Commit 72f58a0

Browse files
committed
fix: property access
1 parent a8a9c90 commit 72f58a0

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ export async function run(): Promise<void> {
1212
const inps: Inputs = getInputs();
1313
showInputs(inps);
1414

15-
const isForkRepository =
16-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
17-
(context.payload as any).repository.fork === 'true';
15+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
16+
const isForkRepository = (context.payload as any).repository.fork;
1817
const isSkipOnFork = await skipOnFork(
1918
isForkRepository,
2019
inps.GithubToken,
2120
inps.DeployKey,
2221
inps.PersonalToken
2322
);
2423
if (isSkipOnFork) {
24+
core.warning(
25+
'Action runs on fork and deploy_key or personal_token is empty, Skip deployment'
26+
);
2527
return;
2628
}
2729

src/utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ export async function skipOnFork(
7575
}
7676

7777
if (deployKey === '' && personalToken === '') {
78-
core.warning(
79-
'Action runs on fork and deploy_key or personal_token is empty'
80-
);
8178
return true;
8279
}
8380
}

0 commit comments

Comments
 (0)