Skip to content

Commit b03e095

Browse files
authored
chore: correct the update PR script
1 parent 1eb1a96 commit b03e095

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/update.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ jobs:
4141
script: |
4242
const {owner, repo} = context.repo
4343
const branch = 'github-actions-auto-update'
44+
const head = `${owner}:${branch}`
4445
const title = 'docs(readme): update emoji-cheat-sheet'
4546
const branchesResult = await github.repos.listBranches({ owner, repo })
4647
if (branchesResult.status !== 200 || !branchesResult.data.find(({ name }) => name === branch)) {
4748
return
4849
}
49-
const prsResult = await github.pulls.list({ owner, repo, head: branch, state: 'open' })
50+
const prsResult = await github.pulls.list({ owner, repo, head, state: 'open' })
5051
if (prsResult.status === 200 && prsResult.data.length === 0) {
51-
await github.pulls.create({ owner, repo, head: branch, title, base: 'master' })
52+
await github.pulls.create({ owner, repo, head, title, base: 'master' })
5253
}

0 commit comments

Comments
 (0)