Skip to content

Handle local sibling upstreams when resolving PR defaults - #8911

Merged
Alex Ross (alexr00) merged 3 commits into
mainfrom
copilot/fix-upstream-branch-error
Aug 28, 2026
Merged

Handle local sibling upstreams when resolving PR defaults#8911
Alex Ross (alexr00) merged 3 commits into
mainfrom
copilot/fix-upstream-branch-error

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Branches using Git’s remote = . convention were misclassified as non-GitHub remotes, causing repeated PR-default polling errors in stacked-branch workflows.

  • Origin resolution

    • Treat . as a local branch relationship.
    • Fall back to the existing GitHub remote selection logic.
    • Preserve errors for actual non-GitHub remotes.
  • Regression coverage

    • Verify PR defaults resolve through origin when a branch tracks a local sibling.

@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>
Copilot AI changed the title [WIP] Fix polling error for local sibling branch upstream Handle local sibling upstreams when resolving PR defaults Aug 27, 2026
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review August 28, 2026 10:43
Copilot AI lite review requested due to automatic review settings August 28, 2026 10:43
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) August 28, 2026 10:43

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 fixes PR-default resolution when a branch’s upstream is configured as a local sibling via Git’s remote = . convention, preventing the extension from misclassifying the upstream as a non-GitHub remote and repeatedly erroring during PR-default polling in stacked-branch workflows.

Changes:

  • Update FolderRepositoryManager.getOrigin to treat upstream remotes with name '.' as a local-branch relationship (skip upstream-remote GitHub resolution and fall back to normal remote selection).
  • Add a unit test to ensure PR defaults still resolve through a GitHub remote when the branch tracks a local sibling.
Show a summary per file
File Description
src/github/folderRepositoryManager.ts Skip upstream-based origin resolution when upstreamRef.remote === '.', allowing fallback GitHub remote selection.
src/test/github/folderRepositoryManager.test.ts Adds regression coverage for local-sibling upstream behavior when resolving PR defaults.

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/test/github/folderRepositoryManager.test.ts
@alexr00
Alex Ross (alexr00) merged commit c381962 into main Aug 28, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the copilot/fix-upstream-branch-error branch August 28, 2026 11:34
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.

Blame hover / PR-defaults polling fails with "is not a GitHub repo" when branch upstream is a local sibling branch (stacked-branch workflows)

4 participants