Skip to content

ci(scrape): auto-merge the daily race-results PR#187

Merged
rootulp merged 1 commit into
mainfrom
fix/scraper-auto-merge
May 14, 2026
Merged

ci(scrape): auto-merge the daily race-results PR#187
rootulp merged 1 commit into
mainfrom
fix/scraper-auto-merge

Conversation

@rootulp
Copy link
Copy Markdown
Owner

@rootulp rootulp commented May 14, 2026

Summary

The daily scraper workflow creates a PR every morning but never schedules a merge — that's why 77 stale auto/scrape-* PRs piled up between 2026-02-27 and 2026-05-14 before the backlog was cleared. Two things are required to fix it; this PR is the second:

  1. Done separately: flipped allow_auto_merge to true at the repo level (it was false, which would silently reject any --auto request even if the workflow asked).
  2. This PR: add gh pr merge --auto --squash --delete-branch after gh pr create in .github/workflows/scrape.yml, so each day's scraper PR squash-merges itself the moment CI goes green and cleans up its branch.

CI is already green on every scraper run going back, so there's no expected blocker — the daily PR will simply land within minutes of being opened.

Test plan

  • Manual diff review: one-line addition after gh pr create
  • After merge, manually dispatch the scrape.yml workflow (gh workflow run scrape.yml) and confirm:
    • the resulting PR enters "auto-merge enabled" state
    • it merges once CI passes
    • the auto/scrape-YYYY-MM-DD branch is deleted
  • Alternatively, wait for tomorrow's 06:00 UTC cron run

🤖 Generated with Claude Code

The daily scraper has been creating a PR every day since Feb 27 without
ever merging any of them — 77 stale PRs accumulated by 2026-05-14.

Root cause: the workflow opens a PR and stops. Nothing schedules a merge,
so each daily PR sits open until a human merges it. Combined with the
repo-level allow_auto_merge being off (now enabled separately), this
guaranteed the backlog.

Add `gh pr merge --auto --squash --delete-branch` after pr-create so each
day's PR squash-merges itself once CI is green, and its branch is cleaned
up automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tritimes Ready Ready Preview, Comment May 14, 2026 7:25pm

@rootulp rootulp self-assigned this May 14, 2026
@rootulp rootulp marked this pull request as ready for review May 14, 2026 19:24
@rootulp rootulp merged commit a9f29c3 into main May 14, 2026
5 of 6 checks passed
@rootulp rootulp deleted the fix/scraper-auto-merge branch May 14, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant