chore: do not throw errors if no new content

pull/543/head
Ika 2021-10-28 13:55:16 +00:00 committed by GitHub
parent aba902ec00
commit 113a0ff313
1 changed files with 5 additions and 1 deletions

View File

@ -49,5 +49,9 @@ jobs:
}
const prsResult = await github.pulls.list({ owner, repo, head, state: 'open' })
if (prsResult.status === 200 && prsResult.data.length === 0) {
await github.pulls.create({ owner, repo, head, title, base: 'master' })
try {
await github.pulls.create({ owner, repo, head, title, base: 'master' })
} catch (error) {
console.error(error)
}
}