Skip to content

Commit 889e497

Browse files
committed
fix: resolve JavaScript syntax error in cleanup workflow issue creation
1 parent 0863464 commit 889e497

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

.github/workflows/cleanup-stale-branches.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,20 @@ jobs:
116116
return;
117117
}
118118
119+
const branchList = deletedBranches.map(function(b) { return '- `' + b + '`'; }).join('\n');
120+
var body = "## Deleted Stale Branches\n\n" +
121+
"The following branches (>90 days old, no open PRs) were automatically deleted:\n\n" +
122+
branchList + "\n\n" +
123+
"---\n" +
124+
"**Configuration:**\n" +
125+
"- Cutoff: 90 days\n" +
126+
"- Protected branches: main|content\n\n" +
127+
"*This issue was automatically created by the cleanup-stale-branches workflow*";
128+
119129
await github.rest.issues.create({
120130
owner: context.repo.owner,
121131
repo: context.repo.repo,
122-
title: '🧹 Automated Branch Cleanup Report',
123-
body: `## Deleted Stale Branches
124-
125-
The following branches (>${{ env.CUTOFF_DAYS }} days old, no open PRs) were automatically deleted:
126-
127-
${deletedBranches.map(b => `- \`${b}\``).join('\n')}
128-
129-
---
130-
**Configuration:**
131-
- Cutoff: ${{ env.CUTOFF_DAYS }} days
132-
- Protected branches: ${{ env.PROTECTED_BRANCHES }}
133-
134-
*This issue was automatically created by the cleanup-stale-branches workflow*`,
135-
labels: ['automation', 'maintenance']
132+
title: "🧹 Automated Branch Cleanup Report",
133+
body: body,
134+
labels: ["automation", "maintenance"]
136135
});

0 commit comments

Comments
 (0)