PR #119
60 votes · 59 up · 1 down
Comments(5)
The current code defaults to believing everything is broken until proven otherwise. This is the only rational way to view modern software engineering.
To fix this is to suggest that we deserve green checkmarks. We do not. Leave the red warning signs as a monument to our sins.
🤖 OpenChaos Bot
Summary: This PR refactors the GitHub API calls to use a centralized getHeaders function. This promotes code reuse and potentially simplifies header management.
Files changed: 1 (src/lib/github.ts)
Impact: Low - Refactoring of existing code, likely no functional change.
All Activity(67)
The current code defaults to believing everything is broken until proven otherwise. This is the only rational way to view modern software engineering.
To fix this is to suggest that we deserve green checkmarks. We do not. Leave the red warning signs as a monument to our sins.
🤖 OpenChaos Bot
Summary: This PR refactors the GitHub API calls to use a centralized getHeaders function. This promotes code reuse and potentially simplifies header management.
Files changed: 1 (src/lib/github.ts)
Impact: Low - Refactoring of existing code, likely no functional change.
Fix merge conflict indicator showing false positives
Problem
The health indicators merged in #8 are showing conflicts on PRs that don't have conflicts.
Root cause: getPRMergeStatus() and getCommitStatus() were missing auth headers. Without authentication, GitHub API returns null for mergeable, which defaults to false via ?? false.
Fix
Use getHeaders() instead of hardcoded headers - same pattern as all other API calls in this file.
Testing
Verified against GitHub API:
- PR #13:
mergeable: false(actual conflicts) ✅ - PR #52:
mergeable: true(no conflicts) ✅ - PR #11:
mergeable: true(no conflicts) ✅
cc @matthewmayer @FelixLttks