**My work entry becomes permanently unusable and un-removable when a PR's bas...
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- git, github, github-actions
- Lĩnh vực
- cli, developer-experience, tooling
Hướng nghiên cứu
Look for the code that prepares worktrees and fetches refs, likely in a module handling 'My work' sessions. The fetch command with multiple refspecs is the culprit. Start by searching for 'git fetch' and 'refs/pull' in the codebase. Understand how the app constructs the fetch command when opening a PR. The fix involves modifying the fetch logic to handle missing base branches gracefully, perhaps by fetching refs separately or using a glob pattern. Test by simulating the scenario in a development environment.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
My work entry becomes permanently unusable and un-removable when a PR's base branch is deleted
Summary
In the My work view, a merged PR whose head/base branches no longer exist stays listed forever with Session: Unavailable. It can never be opened (worktree preparation fails), and there is no way to remove the entry.
Environment
-
GitHub Copilot app 1.1.23 (
github.exe, Windows) -
git 2.53.0.windows.4
-
Private GitHub.com repo; PR was squash-merged and both source branches were deleted afterwards
Steps to reproduce
-
Have a PR whose base branch exists (works normally at this point).
-
Merge it (squash), then delete the head and base branches.
-
Open My work — the PR is still listed (seen in the
AllandDoneviews). -
Try to open it.
Actual
Worktree preparation runs:
Bash
git fetch --no-write-fetch-head origin \
+refs/heads/<base-branch>:refs/remotes/origin/<base-branch> \
+refs/pull/<N>/head:refs/remotes/origin/pr/<N>
and fails with:
Plain text
fatal: couldn't find remote ref refs/heads/<base-branch>
exit code 128, so the session/worktree can't be created. The row remains in the list with Session: Unavailable, permanently.
Root cause / evidence
-
refs/pull/<N>/headstill resolves after a merge, but a singlegit fetchwith multiple refspecs is all-or-nothing: one missing ref aborts the whole fetch and nothing is written — not even the ref that does exist. Reproduced in a clean temporary clone: exit 128, andgit for-each-refshows zero refs written. -
Fetching only
+refs/pull/<N>/head:refs/remotes/origin/pr/<N>succeeds (exit 0), so the PR ref alone would be enough. -
git ls-remote origin "refs/pull/<N>/*"confirms the ref is still available.
Suggested fix
-
Don't put the base-branch and PR-head refspecs in a single fetch; or
-
treat a missing base ref as non-fatal (fetch the PR ref, continue, and degrade the diff base); or
-
use a glob refspec for the base branch — verified that
+refs/heads/<pattern>/*:refs/remotes/origin/<pattern>/*exits 0 silently when nothing matches, while an explicit missing ref name is a hard error. -
Note:
git fetch --no-error-on-missing-refdoes not exist in git 2.53.0.windows.4, so that isn't available.
No workaround currently exists in the UI
Checked in 1.1.23: right-clicking the row → no context menu; Actions → no menu appears for this item; right-clicking the view tab → only Duplicate / Reorder views (no rename/edit-query/delete). The All view's saved query is empty (catch-all), so the entry is always shown there.
Related
#713 (dismiss/snooze individual items in My work) would give an escape hatch, but the underlying fetch failure is a bug on its own.
| Field | Value |
|---|---|
| App version | 1.1.23 |
| OS | Windows 10.0.26200 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Day 5 (Week 1) |
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 2.1k
- Fork
- 157
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/app
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
When using GPT-5.Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
prisma/prisma-cli#309 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-reported area/docs area/server documentation good first issue hacktoberfest help wanted P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area:evidence criticality:p3 triage:needs-implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
registrystack/registry-stack#1620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ai-suggestions bug good first issue P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
uttrflow/uttrflow-swift#1889 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openvinotoolkit/openvino_notebooks#3665 ·
Maintainer thường phản hồi trong vòng 1 ngày