Skip to content

[FR] gh project item-list ; filter on assignee #12664

@lbesnard

Description

@lbesnard

Describe the feature or problem you’d like to solve

When using the gh project item-list command, filtering on assignee is not directly possible, only on owner.
For a project with many members, the command is currently very limited

Proposed solution

it would be great to add at least a --assignees flag (and status or more) such as
gh project item-list --assignees "user1,user2"
gh project item-list --assignees "user1"

This would greatly speed up the query response time. Currently, I have to use the -L 1000 tag, hoping I'm retrieving enough items so I can filter my username out of it with jq.

This is currently what I'm using which is less than ideal:

gh project item-list $PROJECT_NUMBER --owner $ORG --format json -L 1000 |  jq -r '.items[] |
select(.assignees // [] | contains(["'"$GIT_USER"'"])) |
select(.status != "Done" and .status != "Closed") |
((.iteration.title // .milestone.title) // "No-Iteration") as $iter |
"\($iter)\t\(.content.number // "DRAFT")\t\(.content.title)\t\(.content.repository // "none")"' | \
sort -rV

Additional context

Add any other context like screenshots or mockups are helpful, if applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-projectrelating to the gh project command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions