Repository navigation
Fix bug and PR report crash on PRs from deleted forks - #55292
Conversation
GitHub returns head.repo as null when a PR's source fork has been deleted, which crashed the #handbook open-time calculation. Use base.repo instead, which is always present. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The targeted change safely handles deleted forks and matches the GitHub API response shape.
0 open findings
What changed in this PR
Prevents the KPI report from crashing when a pull request’s source fork has been deleted.
Changes:
- Logs the always-present base repository name instead of the nullable head repository name.
| File | Description |
|---|---|
website/scripts/get-bug-and-pr-report.js |
Uses the destination repository when logging handbook PR processing. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe handbook PR processing log now identifies the repository with Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The change avoids the reported deleted-fork crash in the handbook PR logging path. No material merge risk is established. Pre-merge checks |
|
sails run get-bug-and-pr-reportcrashed withTypeError: Cannot read properties of null (reading 'name'). GitHub returnshead.repo: nullfor a PR whose source fork was deleted (currently #55127, a#handbookPR merged Oct 8), and the verbose log line in the handbook PR open-time calculation readpr.head.repo.name. Switched topr.base.repo.name, which is always present and is the repo the PR was merged into.Checklist for submitter
Testing
Reproduced the crash locally, applied the fix, and confirmed the script completes and prints the KPI CSV.
AI
AI: Claude Code (claude-opus-5-5)
🤖 Generated with Claude Code
Summary by CodeRabbit