Skip to content

chore(release): resolve git remotes from URLs with env overrides#6116

Open
hunger wants to merge 1 commit into
prefix-dev:mainfrom
hunger:push-lswozpypnnlt
Open

chore(release): resolve git remotes from URLs with env overrides#6116
hunger wants to merge 1 commit into
prefix-dev:mainfrom
hunger:push-lswozpypnnlt

Conversation

@hunger
Copy link
Copy Markdown
Contributor

@hunger hunger commented May 13, 2026

Previously the script hard-coded 'upstream' for the canonical pull and 'origin' for the fork push, which fails on clones that name those remotes differently. Resolve them by URL instead: pick whichever remote points to prefix-dev/pixi (preferring 'upstream'), and whichever remote points to $GITHUB_USER/pixi (preferring 'origin'). $GITHUB_USER falls back to 'gh api user' when unset. $UPSTREAM_REMOTE and $FORK_REMOTE override the detection entirely for non-standard setups. The script exits with an actionable error if a remote can't be found.

This ports over functionality from the build backend release script.

How Has This Been Tested?

Works-for-me(TM), YOLO.

If the script fails to detect things properly: The remotes can be forced to the old, hard-coded values by setting UPSTREAM_REMOTE=upstream and FORK_REMOTE=origin

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • [-] I have made corresponding changes to the documentation
  • [-] I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

Previously the script hard-coded 'upstream' for the canonical pull and
'origin' for the fork push, which fails on clones that name those
remotes differently. Resolve them by URL instead: pick whichever remote
points to prefix-dev/pixi (preferring 'upstream'), and whichever remote
points to $GITHUB_USER/pixi (preferring 'origin'). $GITHUB_USER falls
back to 'gh api user' when unset. $UPSTREAM_REMOTE and $FORK_REMOTE
override the detection entirely for non-standard setups. The script
exits with an actionable error if a remote can't be found.
@hunger hunger requested a review from ruben-arts May 13, 2026 14:52
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