fix: skip logic

This commit is contained in:
peaceiris 2020-03-15 23:23:30 +00:00
parent 4377a42d7a
commit 44bdada02c
2 changed files with 2 additions and 6 deletions

View File

@ -226,7 +226,7 @@ describe('skipOnFork()', () => {
expect(test).toBeFalsy(); expect(test).toBeFalsy();
}); });
test('return true on fork with empty deploy_key or personal_token', async () => { test('return true on fork with no tokens', async () => {
const test = await skipOnFork(true, '', '', ''); const test = await skipOnFork(true, '', '', '');
expect(test).toBeTruthy(); expect(test).toBeTruthy();
}); });

View File

@ -70,11 +70,7 @@ export async function skipOnFork(
personalToken: string personalToken: string
): Promise<boolean> { ): Promise<boolean> {
if (isForkRepository) { if (isForkRepository) {
if (githubToken) { if (githubToken === '' && deployKey === '' && personalToken === '') {
return false;
}
if (deployKey === '' && personalToken === '') {
return true; return true;
} }
} }