Skip to content

fix(scripts): decouple release detector from fork remotes#278

Open
realsigridjin wants to merge 1 commit into
code-yeongyu:mainfrom
realsigridjin:fix/upstream-release-remote
Open

fix(scripts): decouple release detector from fork remotes#278
realsigridjin wants to merge 1 commit into
code-yeongyu:mainfrom
realsigridjin:fix/upstream-release-remote

Conversation

@realsigridjin

@realsigridjin realsigridjin commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • fetch pi-mono release tags and main from the explicit upstream repository URL
  • avoid treating a contributor fork's conventional upstream remote as badlogic/pi-mono
  • exercise the detector with a conflicting contributor remote and verify output SHAs against the real remote

Verification

  • node --test scripts/check-upstream-release.test.mjs
  • npm run test:scripts (48/48 passed)
  • npm run check
  • npm run build

Notes


Summary by cubic

Decoupled the upstream release detector from contributor remotes to always read releases and main from the real badlogic/pi-mono repository. Prevents false positives when a fork has an upstream remote pointing elsewhere.

  • Bug Fixes
    • Use the explicit upstream URL for all git ls-remote and git fetch calls (no reliance on a local upstream remote).
    • Fetch refs/heads/main into refs/remotes/pi-mono/main and resolve SHAs from that ref for consistency.
    • Tests simulate a conflicting upstream remote, verify SHAs via the real upstream URL, and restore original remotes after.
    • Tests handle offline/credential-less environments and set GITHUB_OUTPUT to avoid output file writes.

Written for commit 222bc69. Summary will update on new commits.

Review in cubic

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