PR #119

60 votes · 59 up · 1 down

View on GitHub
60
Total Votes
+59
Upvotes
-1
Downvotes
+59-1

Comments(5)

skridlevskyComment#119Fix merge conflict indicator showing false positives
image
lens0021Comment#119Fix merge conflict indicator showing false positives

I can't wait for this anymore

matthewmayerComment#119Fix merge conflict indicator showing false positives

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.

skridlevskyComment#119Fix merge conflict indicator showing false positives
Status of each PR is displayed correctly now
openchaos-bot[bot]Comment#119Fix merge conflict indicator showing false positives

🤖 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.


openchaos-bot

All Activity(67)

skridlevskyComment#119Fix merge conflict indicator showing false positives
image
lens0021Comment#119Fix merge conflict indicator showing false positives

I can't wait for this anymore

matthewmayerComment#119Fix merge conflict indicator showing false positives

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.

skridlevskyComment#119Fix merge conflict indicator showing false positives
Status of each PR is displayed correctly now
openchaos-bot[bot]Comment#119Fix merge conflict indicator showing false positives

🤖 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.


openchaos-bot

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