We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2bcb76a + ecd705a commit 075a980Copy full SHA for 075a980
1 file changed
.github/workflows/update-stores.yml
@@ -191,7 +191,13 @@ jobs:
191
console.log("Commit to ${{env.KFUTIL_ARG}} for PR")
192
const owner = context.repo.owner;
193
const repo = context.repo.repo;
194
- const baseBranch = context.ref.replace('refs/heads/', 'main'); // Default base branch is main
+
195
+ // Get the current branch name that the workflow is running on
196
+ const baseBranch = context.payload.ref ?
197
+ context.payload.ref.replace('refs/heads/', '') : 'main';
198
199
+ console.log(`Base branch for PR: ${baseBranch}`);
200
201
const newBranch = '${{env.KFUTIL_ARG}}';
202
const response = await github.rest.pulls.create({
203
owner,
0 commit comments