Skip to content

Identify relationship between issues and pull requests (v3 API) #24492

Discussion options

You must be logged in to vote

In case anyone has a similar issue in the future, my workaround was as follows.

First I grabbed the “html_url” for the issue, retrieved the contents of the URL and used an HTML parser to grab the div with class “css-truncate my-1” and then the href of the anchor within that. The href is a relative URL to the linked pull request. With that, I could break up the path and get the pull number, and use that number to retrieve the pull request information via the REST API.

It’s brittle, but it’s working…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@robinboening
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Jericho
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment