fix: Fix YAML syntax in block-internal-prs workflow
Avoid template literals with backticks that confuse YAML parsers. Use array.join() instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
30
.github/workflows/block-internal-prs.yml
vendored
30
.github/workflows/block-internal-prs.yml
vendored
@@ -18,23 +18,27 @@ jobs:
|
|||||||
const prNumber = context.issue.number;
|
const prNumber = context.issue.number;
|
||||||
const branch = context.payload.pull_request.head.ref;
|
const branch = context.payload.pull_request.head.ref;
|
||||||
|
|
||||||
|
const body = [
|
||||||
|
'**Internal PRs are not allowed.**',
|
||||||
|
'',
|
||||||
|
'Gas Town agents push directly to main. PRs are for external contributors only.',
|
||||||
|
'',
|
||||||
|
'To land your changes:',
|
||||||
|
'```bash',
|
||||||
|
'git checkout main',
|
||||||
|
'git merge ' + branch,
|
||||||
|
'git push origin main',
|
||||||
|
'git push origin --delete ' + branch,
|
||||||
|
'```',
|
||||||
|
'',
|
||||||
|
'See CLAUDE.md: "Crew workers push directly to main. No feature branches. NEVER create PRs."'
|
||||||
|
].join('\n');
|
||||||
|
|
||||||
await github.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: prNumber,
|
issue_number: prNumber,
|
||||||
body: `🚫 **Internal PRs are not allowed.**
|
body: body
|
||||||
|
|
||||||
Gas Town agents push directly to main. PRs are for external contributors only.
|
|
||||||
|
|
||||||
To land your changes:
|
|
||||||
\`\`\`bash
|
|
||||||
git checkout main
|
|
||||||
git merge ${branch}
|
|
||||||
git push origin main
|
|
||||||
git push origin --delete ${branch}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
See CLAUDE.md: "Crew workers push directly to main. No feature branches. NEVER create PRs."`
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await github.rest.pulls.update({
|
await github.rest.pulls.update({
|
||||||
|
|||||||
Reference in New Issue
Block a user