How can I search/list issues by issue numbers? #12213
-
|
Apologies if this was asked before, but I've wondered this about the web view, and now the GitHub CLI tool. I can view a single issue as How can I view multiple issues? Alternatively, how can I search by issue number? My goal is to take a list of PRs, grab their I can do that in a loop, no problem. However, it seems silly and wasteful to make This is a bad assumption, as I can already show that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey @sureshjoshi, this isn't possible as a first class command in In the meantime, your best bet (assuming you've already figured out how to get your issue numbers) might be something like: ➜ cli git:(wm/refactor-gh-out-of-capi-client) ✗ issues=(12214 12203 12202)
query='query($owner:String!, $name:String!){ repository(owner:$owner, name:$name) {'
for n in "${issues[@]}"; do
query+=" i$n: issue(number: $n) { number title state url }"
done
query+=' } }'
gh api graphql -F owner='cli' -F name='cli' -f query="$query" | jq .
{
"data": {
"repository": {
"i12214": {
"number": 12214,
"title": "Unable to edit repository metadata with accessible_prompter enabled",
"state": "OPEN",
"url": "https://github.com/cli/cli/issues/12214"
},
"i12203": {
"number": 12203,
"title": "`gh pr status` shows 'no pull request associated' on a branch pulled via `gh pr checkout` from a fork",
"state": "OPEN",
"url": "https://github.com/cli/cli/issues/12203"
},
"i12202": {
"number": 12202,
"title": "Provide an easy way to encrypt a message to a user using their Github public key",
"state": "OPEN",
"url": "https://github.com/cli/cli/issues/12202"
}
}
}
} |
Beta Was this translation helpful? Give feedback.
Hey @sureshjoshi, this isn't possible as a first class command in
gh. Feel free to open an enhancement issue if it is something you really want.In the meantime, your best bet (assuming you've already figured out how to get your issue numbers) might be something like: