fix: change or->and to catch all errors

This commit is contained in:
Peter Evans 2020-12-09 09:38:10 +09:00
parent ce699aa2d1
commit d01e0807ef
2 changed files with 9 additions and 4 deletions

View file

@ -58,9 +58,11 @@ export class GitHubHelper {
}
} catch (e) {
if (
!e.message ||
!e.message.includes(`A pull request already exists for ${headBranch}`)
e.message &&
e.message.includes(`A pull request already exists for ${headBranch}`)
) {
core.info(`A pull request already exists for ${headBranch}`)
} else {
throw e
}
}