From b03e095fb072b8f6cb8886f75f44803ea7a18eea Mon Sep 17 00:00:00 2001 From: Ika Date: Sun, 17 Oct 2021 03:58:07 +0000 Subject: [PATCH] chore: correct the update PR script --- .github/workflows/update.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 04b9490..e4fcfc5 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -41,12 +41,13 @@ jobs: script: | const {owner, repo} = context.repo const branch = 'github-actions-auto-update' + const head = `${owner}:${branch}` const title = 'docs(readme): update emoji-cheat-sheet' const branchesResult = await github.repos.listBranches({ owner, repo }) if (branchesResult.status !== 200 || !branchesResult.data.find(({ name }) => name === branch)) { return } - const prsResult = await github.pulls.list({ owner, repo, head: branch, state: 'open' }) + 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: branch, title, base: 'master' }) + await github.pulls.create({ owner, repo, head, title, base: 'master' }) }