Commit hash links on a pull request should link to the PR diff instead of the absolute commit URL

XMLWordPrintable

    • 6
    • 2

      BitBucket has a feature that automatically hyperlinks a hash if it detects it in the PR Detail page.
      However, if those hashes are part of the pull request, it makes more sense to link directly to the PR -> DIFF -> Show Diff of -> {hash}; in other words the URL it would hyeprlink to would be of the form: /projects/X/repos/x/pull-requests/2025/commits/{hash} instead of simply /projects/X/repos/x/commits/{hash}

      Our rationale for this is that our team likes to review the commit messages, and since there is no supported way to do that we automatically put the hash and the commit message on the PR detail field. What’s happening as a result of this hyperlinking is that people are clicking on the hyperlinked commit and commenting on it. This causes the comment to be tied to the “Commit” object instead of the “Pull Request’.
      Since we do rebase workflow that also means that the comment the reviewer left could be never seen or omitted.

            Assignee:
            Unassigned
            Reporter:
            Corey Steele
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: