You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add field to retrieve linked PRs (closingPRsReferences) in gh issue view <number #10563
Now that we have #10544 merged, thanks to @iamazeem, I think we can define the acceptance criteria for this one.
Acceptance Criteria
Given a PR references an issue to close when I use gh issue view <number> --json closedByPullRequestsReferences then I get a JSON object containing closedByPullRequestsReferences as an array of referenced issues with sufficient details to locate the PR(s):
Activity
iamazeem commentedon Mar 10, 2025
GraphQL query:
Example with
gh apifor #10529:For consistency,
closedByPullRequestsReferencesmay be used for the JSON field:babakks commentedon May 6, 2025
Now that we have #10544 merged, thanks to @iamazeem, I think we can define the acceptance criteria for this one.
Acceptance Criteria
Given a PR references an issue to close
when I use
gh issue view <number> --json closedByPullRequestsReferencesthen I get a JSON object containing
closedByPullRequestsReferencesas an array of referenced issues with sufficient details to locate the PR(s):Note that the nested structure (for
repositoryandownerfields) is mainly to keep the schema consistent withgh repo view --jsonoutput.babakks commentedon May 6, 2025
The implementation should look like #10544, except it's for PRs. This is a non-paginated GQL query example (try in GQL Explorer):
With example variables:
{ "repo": "cli", "owner": "cli", "issue": 10529 }The response will be:
{ "data": { "repository": { "issue": { "closedByPullRequestsReferences": { "nodes": [ { "number": 10544, "id": "PR_kwDODKw3uc6Nbtk1", "url": "https://github.com/cli/cli/pull/10544", "repository": { "owner": { "login": "cli" }, "name": "cli" } } ] } } } } }babakks commentedon May 6, 2025
We discussed about this issue in the team and decided to mark it as
help-wanted.@iamazeem, since you did the
pr viewpart in #10544, would you like to take this one as well?iamazeem commentedon May 6, 2025
Sure, I'd like to take this one too. 👍