I am trying to auto-generate a URL that can point to a line number into the GitHub Pull request's file diff view.
Basically, given the URL https://github.com/weppos/whois/pull/90/files
I'd like to generate URL like https://github.com/weppos/whois/pull/90/files#diff-ce6bf647d5a531e54ef0502c7fe799deR27 that can point to the line 27 of file in the GitHub pull request. Looking at the URL, seems like it's combination of
https://github.com/weppos/whois/pull/90/ + files/#diff- + ce6bf647d5a531e54ef0502c7fe799de + R27
I am not sure how to retrieve number ce6bf647d5a531e54ef0502c7fe799de given everything else is known. It'd be great if someone can provide some pointers. Thanks!