fix(github): only swallow 404 in removePullRequestLabel (#6192)#6211
Conversation
Match ensurePullRequestLabel's narrow-swallow pattern so a missing label (404) stays best-effort, while 403/5xx/rate-limit failures propagate instead of being silently discarded. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-15 23:14:51 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 4 non-blocking
Flagged checks (non-blocking)
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6211 +/- ##
=======================================
Coverage 95.34% 95.34%
=======================================
Files 600 600
Lines 47308 47310 +2
Branches 15085 15086 +1
=======================================
+ Hits 45105 45107 +2
Misses 1477 1477
Partials 726 726
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
CI is fully green now (including Ready for re-review whenever convenient. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Summary
removePullRequestLabelused a bare.catch(() => undefined), so 403/5xx/rate-limit failures were discarded the same as a missing-label 404ensurePullRequestLabelin the same file: only swallowstatus === 404; re-throw everything elseCloses #6192
Scope
Closes #6192Validation
test/unit/github-labels.test.tsfor 404 / non-404 / success pathsSafety
UI Evidence
Not applicable — no UI change.
Notes
ensurePullRequestLabelis unchanged; it remains the reference narrow-swallow pattern.Made with Cursor