Support for discovering referenced and to-be-closed issues from a PR #24706
-
There doesn’t seem to be an API endpoint (or GraphQL query at least) for what issues are referenced or will be closed when a PR is merged. Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
I haven’t tested this, but you may be able to go through the timelineItems connection and look for Let me know if that helps! |
Beta Was this translation helpful? Give feedback.
-
That was my initial though as well, but unless I’m mistaking the Perhaps a |
Beta Was this translation helpful? Give feedback.
-
Yes, you’re correct, the field is called Unfortunately, the |
Beta Was this translation helpful? Give feedback.
-
How about after the fact? The Issue in GitHub has a “Fixed by #nnn” status implying that there is an association to a PR from the Issue’s perspective. The timeline will even show the reference and I’m assuming that the merge of the PR invokes an automatic close of the issue referenced in the PR. I would like to be able to trace back from the issue the PR that closed it similar to how the GitHub UI does it? I’ve grabbed all of the events to the issue and the Events help page indicates that with the close event:
But I have found that the commit_id is not populated. Instead, occassionally, there is a reference with a commit ID following the close event. But this doesn’t happen all the time. So what is being used by the UI to show the status that the issue was closed by a particular PR? |
Beta Was this translation helpful? Give feedback.
-
FWIW, this is now available as the |
Beta Was this translation helpful? Give feedback.
-
Alas, the |
Beta Was this translation helpful? Give feedback.
FWIW, this is now available as the
closingIssuesReferences
field onPullRequest
GraphQL objects.