How do I reference a specific issue comment on github?

Github

Github Problem Overview


I'm trying to refer to a specific issue comment on github, in my readme. But I can't find any information on how to do that (here for example). I know that it's possible to link to issues, but is it possible to link to specific comments in that issue?

Github Solutions


Solution 1 - Github

You can click on the date in the header of the comment to get a URL to the comment

enter image description here

For example, for issue https://github.com/centic9/jgit-cookbook/issues/5 one of the comments has the following link: https://github.com/centic9/jgit-cookbook/issues/5#issuecomment-51084491.

Solution 2 - Github

Simple method:

Every comment in github has header like below

[Commenter Name] commented on [x days ago]

Right click the date information i.e. [x days ago] and copy the link

Solution 3 - Github

Since August 2018, there is a more intuitive (and likely more reliable) way.
See "Copy the URL of a comment":

> Previously, in order to grab a permalink to a comment within an issue or pull request, you’d need to copy the URL from a comment’s timestamp.
> > Now you can click Copy URL within the comment’s options menu to quickly copy the URL to your clipboard.

Copy comment URL.

This works on commits in a Pull Request too:
https://github.com/moby/moby/pull/37558#discussion_r211356672 refers to:

Copy on PR comment


And since February 2019, that works on mobile too!

> Issue and pull request comment permalinks can now be copied on mobile devices, via the comment action menu.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1694077View Question on Stackoverflow
Solution 1 - GithubcenticView Answer on Stackoverflow
Solution 2 - GithubCreativeManixView Answer on Stackoverflow
Solution 3 - GithubVonCView Answer on Stackoverflow