From 113a0ff3133b530f2a255ab168f19b0376e0c1f8 Mon Sep 17 00:00:00 2001 From: Ika Date: Thu, 28 Oct 2021 13:55:16 +0000 Subject: [PATCH] chore: do not throw errors if no new content --- .github/workflows/update.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index e4fcfc5..22c577c 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -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) + } }