The following description is copied (with minor rewordings) from Links to pull request commits are auto-converted incorrectly by mspncp · Pull Request #3 · mspncp/playground · GitHub, which not only explains, but also demonstrates the issue.
If you copy&base the following URL in the editor control at the end of the pull request thread
the editor recognizes and auto-converts it to a pretty short hash URL
aa7cea1. Unfortunately, that auto-converted link points to the “detached commit”
and not to the original commit attached to the pull request, i.e., the “Files changed” view, narrowed down to that single commit.
This is inconvenient, because reviewers might follow the link and make code comments which don’t become part of this pr’s thread.
Regardless of how the commit is entered by the user (text or URL), an auto-converted commit link should always link to the “pull request commit”
if the commit
<commit_id> is part of the pull request, and only otherwise to the “detached commit”