Skip to content

Link to Perforce change list from whenever a `[git-p4: ...]` appears in a commit message

Created by: dadlerj

Reported by https://app.hubspot.com/contacts/2762526/company/693777200

This company is using src-expose and git-p4 to load Perforce repos into Sourcegraph.

A user noted that it's an annoying workflow to go from Sourcegraph's commit list, or commit diffs view, or from our diff/commit search results pages, etc. back to the corresponding change list on Perforce.

Thankfully, git-p4 annotates every commit message with info about the depot and change — it adds a line to the bottom that looks like:

[git-p4: depot-paths = "//depot-mobile/project/": change = 1794239]

(copied from the example at https://www.atlassian.com/git/tutorials/git-p4)

An extension that could turn this into a link in our UI (rather than code) would be great! Is that even possible using our extension API, though, @felixfbecker @twop ?