Skip to content

Commit

Permalink
fix: skip logic
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Mar 15, 2020
1 parent 4377a42 commit 44bdada
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
6 changes: 1 addition & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 44bdada

Please sign in to comment.