Bare `#NNNNN` auto-linkifies against the current repo, breaking cross-repo issue/PR references
- 主要語言
- Shell
- 星號
- 11.2k
- 分支
- 1.9k
- 平均合併
- 14 小時 16 分鐘
- 30 天內合併 PR
- 6
描述
### Summary
In the CLI's rendered output, a bare `#NNNNN` is auto-linkified as an issue/PR mention resolved against the **current repository's** remote. When the number actually refers to a *different* repository, this produces an incorrect link.
### Environment
- GitHub Copilot CLI v1.0.64 (Linux)
### Example
While working in repository `owner/repoA`, referring to an upstream pull request from another project as `#205054` renders as a link to `https://github.com/owner/repoA/issues/205054` — a bogus URL (there is no such issue in `repoA`; the real reference is `other-org/other-repo#205054`).
### Expected
One of:
- Don't auto-linkify a bare `#NNNNN` unless it resolves to an existing issue/PR in the current repo, **or**
- Provide a setting to disable issue/PR auto-linkification, **or**
- Only auto-linkify qualified references (`owner/repo#NNNN`).
### Impact
Easy to hit whenever working in one repo (e.g. a fork or mirror) while citing issues/PRs from another (e.g. an upstream project). The generated links are misleading. Minor but common.
### Workarounds
Full URL (`https://github.com/org/repo/pull/NNNN`), a qualified `owner/repo#NNNN`, or wrapping the literal in backticks (`` `#NNNN` ``) so it isn't linkified.
### Note
`#` is documented in the CLI help as "mention issues and pull requests". The request is to make a bare cross-repo number either non-linkified or configurable.
貢獻指南
研究方向
issue 中沒有指定原始檔案或測試。先找出 CLI 對 issue 和 pull request 自動連結的渲染輸出處理,然後重現跨 repository 的範例 `#205054`;當裸引用不再產生指向目前 repository 的誤導性連結,且選定的行為已由測試涵蓋時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- shell
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 冷清
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100