Skip to content

Commit 8644827

Browse files
ci(buddy-bot): add daily cleanup cron to workflow
Regenerated from buddy-bot's patched generateUnifiedWorkflow template. The previous version dropped the scheduled `check` job entirely in favor of an event-driven `pull_request: types: [edited]` trigger, but that almost never fires in practice — so cleanupStaleBranches and obsolete-PR cleanup stopped happening and orphan buddy-bot/* branches accumulated indefinitely. Adds back a single daily cron at 4am UTC that fires the `check` job, capping orphan age at ~24h while keeping rebase responsiveness instant via the PR-edit trigger. Refs: stacksjs/buddy-bot@0d459cf
1 parent 8f0da90 commit 8644827

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/buddy-bot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- cron: '0 */2 * * *'
1212
# Update dashboard 15 minutes after dependency updates (ensures updates are reflected)
1313
- cron: '15 */2 * * *'
14+
# Daily cleanup at 4am UTC — runs the check job for orphan-branch cleanup
15+
# and obsolete-PR detection. The PR-edited trigger handles rebase requests
16+
# in real time, but cleanup needs a scheduled tick or stale branches pile up.
17+
- cron: '0 4 * * *'
1418

1519
workflow_dispatch: # Manual trigger
1620
inputs:
@@ -134,6 +138,8 @@ jobs:
134138
echo "run_update=true" >> $GITHUB_OUTPUT
135139
elif [ "${{ github.event.schedule }}" = "15 */2 * * *" ]; then
136140
echo "run_dashboard=true" >> $GITHUB_OUTPUT
141+
elif [ "${{ github.event.schedule }}" = "0 4 * * *" ]; then
142+
echo "run_check=true" >> $GITHUB_OUTPUT
137143
fi
138144
fi
139145

0 commit comments

Comments
 (0)