github / github/app

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

未关闭
#1,759 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

调研方向

首先追踪 /chat 界面背后的 session/PR 集成,包括 session 徽章和元数据的行为。定义手动 relink 操作与 agent 工具如何共享更新,然后验证新的 PR 会替换旧关联、支持 PR 的操作会以它为目标,并且不会创建新的 session。

由索引模型根据 Issue 内容生成。

评估

技术栈
github
领域
api, developer-experience, full-stack
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。