Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

Getting the anchor to files diffs in a pull request

Hey there,

I'm trying to retrieve the link to the diff for each file in the pull request, which follows the following format:

 

https://github.com/<username>/<repository>/pull/<pull-id>/files#diff-<file-diff-anchor>

 

The closest I've got is the raw patch, which is not actually useful for me (List pull requests files API documentation).

 

I've been playing around with the PR data and also googling and checking the API documentation for a while with no luck, and I don't know where to continue looking at.

 

Is this even possible?

Thanks in advance.

 

2 Replies
Community Manager
Message 2 of 3

Re: Getting the anchor to files diffs in a pull request

No, there isn't a way to get the anchor link you're asking for via the API. It is something that has been requested previously, but I can't give an ETA or even say whether it is something the development team will implement. I'll pass along your feedback however.

 

Thanks for reaching out.

Copilot Lvl 2
Message 3 of 3

Re: Getting the anchor to files diffs in a pull request

It seems to be MD5 from the file name