Skip to content

Commit f3e2440

Browse files
author
Ian Walter
authored
Still trying to fix branch logic
1 parent 645af83 commit f3e2440

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ async function run () {
7171
await execa('git', ['commit', '-m', 'Adding changeset'])
7272

7373
// Push the changes back to the branch.
74-
const branch = (process.env.GITHUB_REF || 'main').split('/').pop()
74+
const ref = process.env.GITHUB_REF
75+
const branch = dot.get(github.context, 'payload.pull_request.head.ref', ref)
7576
const actor = process.env.GITHUB_ACTOR
7677
const token = process.env.INPUT_GITHUB_TOKEN
7778
const repo = process.env.GITHUB_REPOSITORY

0 commit comments

Comments
 (0)