fix: remove double-normalization in overridePersistedExtraheader#44492
Merged
Conversation
…add trailing-slash test Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…xtraheader test Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Matt Pocock Skills Reviewer failure
fix: remove double-normalization in overridePersistedExtraheader
Jul 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates git auth helper behavior and tests to ensure URL normalization happens at the correct layer, avoiding passing pre-normalized values into helpers that also normalize.
Changes:
- Update
overridePersistedExtraheaderto pass the rawserverUrlintogetExtraheaderValues()(which normalizes internally). - Add a test asserting that a trailing-slash server URL results in normalized git config keys for both read and write operations.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/git_auth_helpers.cjs | Removes pre-normalization before calling getExtraheaderValues() to clarify normalization responsibility. |
| actions/setup/js/git_auth_helpers.test.cjs | Adds regression test for trailing-slash URLs to ensure normalized git config keys are used consistently. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Low
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
The Matt Pocock Skills Reviewer flagged several issues in the git auth helper code introduced with the CI trigger push feature. Issues 1–4 (the
overrideAppliedguard, push-failure test,getErrorMessageusage, and missingsilentflag on the write) were already resolved before this PR.Changes
git_auth_helpers.cjs):overridePersistedExtraheaderwas callingnormalizeServerUrl()on the input and then passing the result togetExtraheaderValues(), which normalizes again internally. Each function now normalizes its own input, making the contract unambiguous.git_auth_helpers.test.cjs): added aoverridePersistedExtraheadertest with a trailing-slash URL to explicitly assert that both the read (--get-all) and write (--replace-all) git config calls use the normalized key — documenting the normalization contract at the right layer.