github / github/app

Feature request: allow relinking a session to a different Pull Request

Offen
#1,759 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
2.1k
Forks
153
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Feature request: allow relinking a session to a different Pull Request

We found a gap in the current session/PR integration model.

A session can remain internally linked to an old PR even when the underlying Git branch has been moved, rebased, or intentionally repointed to a different existing PR. In this case, GitHub shows the correct PR for the branch, but the session UI badge and session metadata still point to the previous PR. This creates confusion because the session appears attached to the wrong review context even though the actual branch state is correct.

Requested capability
Please add support for changing the PR linked to an existing session, in two forms:

Manual UI action

A session-level action such as "Change linked PR" or "Relink session to PR"
Allow selecting an existing PR in the same repository
Update the session badge, metadata, and any PR-aware UI surfaces accordingly
Tool/API support

Add a tool/action that allows an agent to update the PR associated with the current session
This is important when the branch is intentionally reused, fast-forwarded, rebased, or moved under a different PR and we want the session context to stay aligned without creating a new session
Why this matters
This is useful when:

a branch is repointed to an existing PR
an incorrect PR was initially associated with the session
a user wants to keep the same session history/worktree but move to the correct PR context
GitHub branch-to-PR state is correct, but the Copilot session metadata is stale
Expected behavior
After relinking:

the session should display the correct PR badge
PR-related UI actions should target the new PR
the old PR association should be fully replaced
no new session should be required
Nice-to-have
validation that the selected PR matches the current repository
warning if the selected PR head branch does not match the current session branch
optional "force relink" behavior for advanced cases

---
| Field | Value |
| --- | --- |
| App version | 1.0.17 |
| OS | Windows 10.0.26200 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Day 6 (Week 1) |

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by tracing the session/PR integration behind the /chat surface, including the session badge and metadata behavior. Define how the manual relink action and agent tool share the update, then verify that the new PR replaces the old association, PR-aware actions target it, and no new session is created.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github
Bereich
api, developer-experience, full-stack
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.