-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
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 -rVAdditional context
Add any other context like screenshots or mockups are helpful, if applicable.
Acceptance Criteria
Given I am targeting github.com
When I run project item-list with the --query flag
Then the query is respected in the results
Given I am targeting a version of GHES that doesn't support the query flag
When I run project item-list with the --query flag
Then I receive an informative error