Skip to content

[WIP] Fix fork-backed create_pull_request duplicate Authorization error - #48501

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-create-pull-request-error
Closed

[WIP] Fix fork-backed create_pull_request duplicate Authorization error#48501
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-create-pull-request-error

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor
  • Move withGitHubHostToken to git_auth_helpers.cjs and export it (shared utility)
  • Update push_to_pull_request_branch.cjs to import withGitHubHostToken from git_auth_helpers.cjs instead of defining it locally
  • Update create_pull_request.cjs:
    • Import withGitHubHostToken from git_auth_helpers.cjs
    • Add cwd option to handleRemoteBranchCollision
    • Use withGitHubHostToken with cwd in handleRemoteBranchCollision instead of inline override/restore
    • Pass cwd to git ls-remote exec options in handleRemoteBranchCollision
    • Update all 3 call sites of handleRemoteBranchCollision to pass cwd: process.cwd()
  • Add withGitHubHostToken tests in git_auth_helpers.test.cjs (5 new tests)
  • Run make fmt and make agent-report-progress
  • All 263 tests pass across modified files

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: bug | Risk: high | Score: 35/100
  • Impact 20 · Urgency 10 · Quality 5
  • Recommended action: defer

Explicitly marked [WIP] draft; diff is currently just a checklist (1 line changed), no substantive code yet. Defer until work is pushed and draft is removed.

Generated by 🔧 PR Triage Agent · sonnet50 · 50.9 AIC · ⌖ 5.23 AIC · ⊞ 7.5K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fork-backed create_pull_request fails with duplicate Authorization HTTP 400

2 participants