Skip to content

Fix duplicate entries in .git/config for GitHub PRs - #8876

Merged
Alex Ross (alexr00) merged 4 commits into
mainfrom
copilot/fix-duplicate-github-pr-configs
Aug 12, 2026
Merged

Fix duplicate entries in .git/config for GitHub PRs#8876
Alex Ross (alexr00) merged 4 commits into
mainfrom
copilot/fix-duplicate-github-pr-configs

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
  • Add focused regression tests for repeated and changed PR metadata associations
  • Replace existing PR and base-branch metadata instead of appending values
  • Run targeted tests, lint, and hygiene checks (compile, lint, and hygiene pass; extension-host execution is blocked by the unavailable VS Code Insiders download)
  • Complete code review and security validation

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
@alexr00

Copy link
Copy Markdown
Member

Copilot continue

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Copilot continue

Continued in 4fca727: serialized concurrent config updates, added regression coverage, and completed review/CodeQL. Compile, lint, and hygiene pass; extension-host execution remains blocked by DNS for the VS Code Insiders download.

@alexr00
Alex Ross (alexr00) marked this pull request as ready for review August 12, 2026 10:03
Copilot AI lite review requested due to automatic review settings August 12, 2026 10:03
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) August 12, 2026 10:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #8871 where the extension’s PR/base-branch association metadata written into .git/config accumulates duplicate entries over time, by ensuring repeated associations don’t continually append additional values and by adding regression coverage for the expected behavior.

Changes:

  • Add focused tests ensuring PR/base-branch metadata is replaced (not appended) across repeated calls and concurrent calls.
  • Introduce a serialized setConfig helper to avoid concurrent update races and to prevent repeated appends when the effective value is already correct.
  • Update associateBranchWithPullRequest and associateBaseBranchWithBranch to use the new helper.
Show a summary per file
File Description
src/test/github/pullRequestGitHelper.test.ts Adds regression tests for repeated/concurrent PR association and base-branch metadata replacement behavior.
src/github/pullRequestGitHelper.ts Adds a serialized config update helper and routes PR/base-branch association writes through it to prevent unbounded duplicate config growth.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread src/github/pullRequestGitHelper.ts
@alexr00 Alex Ross (alexr00) changed the title [WIP] Fix duplicate entries in .git/config for GitHub PRs Fix duplicate entries in .git/config for GitHub PRs Aug 12, 2026
@alexr00
Alex Ross (alexr00) merged commit 849821a into main Aug 12, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the copilot/fix-duplicate-github-pr-configs branch August 12, 2026 11:17
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.

.git/config accumulates duplicate github-pr-owner-number/github-pr-base-branch entries instead of replacing them

4 participants