Skip to content

Commit f3dd729

Browse files
fix: resolve YAML syntax error in merge-bot workflow template literal (#21)
Fix template literal interpolation issue by extracting pr.base.ref to a local variable before using it in the comment body. This prevents YAML parsing errors with the GitHub Actions workflow. The issue occurs when GitHub Actions tries to parse the workflow file and encounters ${pr.base.ref} inside a JavaScript template literal, which can be confused with GitHub Actions variable interpolation syntax. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1a39c18 commit f3dd729

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/merge-bot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ jobs:
409409
core.info('❌ PR is from fork - update not supported');
410410
core.setOutput('is_fork', 'true');
411411
412+
const baseBranch = pr.base.ref;
412413
await github.rest.issues.createComment({
413414
owner: context.repo.owner,
414415
repo: context.repo.repo,
@@ -418,8 +419,8 @@ jobs:
418419
To update your branch, please run these commands locally:
419420

420421
\`\`\`bash
421-
git fetch upstream ${pr.base.ref}
422-
git merge upstream/${pr.base.ref}
422+
git fetch upstream ${baseBranch}
423+
git merge upstream/${baseBranch}
423424
git push
424425
\`\`\`
425426

0 commit comments

Comments
 (0)