github / github/app

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

Ouverte
#1,759 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Aucune donnée de langage
Étoiles
2.1k
Forks
153
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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) |

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github
Domaine
api, developer-experience, full-stack
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.