gh project view-list, and gh project item-list --view <number>
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
- 67/100
Hướng nghiên cứu
Bắt đầu với các đường dẫn lệnh hiện có của gh project field-list và item-list, sau đó kiểm tra kết nối ProjectV2.views được sử dụng thông qua gh api graphql. Hoàn tất khi thêm view-list với number, name, layout, filter và hỗ trợ --format json; item-list --view vẫn phụ thuộc vào kết nối items của ProjectV2View ở upstream.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature or problem you'd like to solve
gh project can list a project's fields and its items, but nothing about its views. There's no way from the CLI to list the views a project has, or to list the items a given view shows.
The second is the one that hurts. A view is how a person reads a project — filtered, grouped and sorted. A script can't ask for the same thing, so it re-implements the view's filter as a --jq expression over gh project item-list output for the whole project. The view and the script then become two independent definitions of one queue, kept in step by convention. When they drift, both still look correct.
Proposed solution
-
gh project view-list <number> --owner <owner>— list a project's views (number, name, layout, filter), with--format json. This is implementable today: theProjectV2.viewsconnection already returns all of it, and it's currently reachable only by hand-writing a GraphQL query throughgh api graphql. -
gh project item-list <number> --owner <owner> --view <view-number>— the items as that view shows them.
(2) is blocked upstream rather than by the CLI: ProjectV2View has no items connection, so there's no server-side way to apply a view's filter. I've filed that with the Projects team separately: a view's contents cannot be read from any API. Raising it here so the CLI half is tracked, and because (1) is useful on its own and doesn't depend on it.
One request if (2) is ever picked up: please don't implement it by parsing the filter string and evaluating it client-side. The project filter language isn't equivalent to what gh could evaluate locally — leaf-only ("has no sub-issues"), for instance, isn't expressible in a view filter at all — so it would be a lossy approximation that silently disagrees with what the UI shows, which is worse than not having the flag.
Additional context
gh --version → 2.89.0. gh project --help lists field-list, item-list, item-add and so on, with no view-related command.
- Ngôn ngữ chính
- Go
- Star
- 46.3k
- Fork
- 9.1k
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 76
Hướng dẫn đóng góp
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 cli/cli
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
more-info-needed needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
bug gh-pr priority-2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
bug gh-pr priority-2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug gh-auth priority-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
googleapis/librarian#7670 · 2 bình luận ·