fix(artifacts-init): preserve configured HTTPS push remotes#2225
Open
time-attack wants to merge 1 commit into
Open
fix(artifacts-init): preserve configured HTTPS push remotes#2225time-attack wants to merge 1 commit into
time-attack wants to merge 1 commit into
Conversation
Honor the provider CLI protocol for created remotes, preserve the scheme of explicitly supplied and existing remotes, and add a push-protocol override. Add regression coverage for HTTPS, SSH, unset configuration, GitHub, GitLab, explicit URLs, overrides, and invalid values. Fixes garrytan#1348
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gh config get git_protocolfor provider-created GitHub remotes, with the GitHub CLI default of HTTPS when the value is unavailable--remoteURLs and existing remotes, fixing the July report where an explicit HTTPS recovery URL was converted back to SSH--push-protocol auto|https|sshfor deliberate overridesFixes #1348.
Why this differs from #1469
PR #1469 handles provider-created remotes, but its
autopath falls back to SSH whenHOST_PREFis empty. That means--remote https://...still becomes SSH, reproducing the newer failure reported on July 3. It also uses SSH when GitHub CLI's setting is unavailable, while GitHub CLI itself defaults to HTTPS.This version distinguishes provider-created, explicit, existing, and manually entered remotes. Explicit and existing URL schemes are preserved; provider-created remotes follow the CLI preference.
pr-test-env live matrix
SSH was disabled for every run to reproduce an HTTPS-only machine. Before the fix, all five installs rewrote the HTTPS URL to
git@github.com:...and exited atgit ls-remote. After the fix, all five completed init and pushedmainto a private HTTPS GitHub fixture.Tests
bash -n bin/gstack-artifacts-init: passbun test test/pr-test-env.test.ts: 34 pass, 0 failbun test test/gstack-artifacts-init.test.ts test/gstack-artifacts-url.test.ts test/brain-sync.test.ts test/setup-gbrain-path4-structure.test.ts: 78 pass, 0 failbun testwas not a usable gate under local Bun 1.2.19: unrelated existing files require unavailabletest.concurrentandBun.YAML, with additional PATH-dependent gbrain baseline failures. The issue-specific and affected-area suites above are green.Versioning
Raw fix only.
VERSION,CHANGELOG.md, package version, generated skill indexes, and the localpr-test-envharness are untouched.