Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

gh project view-list, and gh project item-list --view <number>

Đang mở
#14,306 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, go
Lĩnh vực
api, cli

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ả

enhancement gh-project
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
  1. gh project view-list <number> --owner <owner> — list a project's views (number, name, layout, filter), with --format json. This is implementable today: the ProjectV2.views connection already returns all of it, and it's currently reachable only by hand-writing a GraphQL query through gh api graphql.

  2. 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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cli/cli

Tất cả issue của cli/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.