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();
});
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, '', '', '');
expect(test).toBeTruthy();
});

View File

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