gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.87k stars 1.23k forks source link

Gerrit: parse change-ids in the whole message body, not only in the footer #2251

Open felipecrs opened 1 year ago

felipecrs commented 1 year ago

In Gerrit commit messages, you can include as many change ids as you want. Gerrit's UI will add a hyperlink to each change id found. See:

image

However, Gitlens currently only parses the last one, in the footer:

image

PS: I'm working on a PR. Edit: not anymore.

eamodio commented 1 year ago

TY

felipecrs commented 1 year ago

Sorry, @eamodio, I wrongly assumed that Gitlens supported some kind of regex-based autolinks reference, but unfortunately it does not as of now.

It has been previously suggested/reported:

So, I can say that this depends on that to be implemented first.


This is to say: please don't expect a PR from me in the short-term anymore. If anyone else wants to work on this issue (or the referenced issues), feel totally free.

felipecrs commented 1 year ago

@eamodio actually here is the PR: #2255, I just need a little bit of help to finish it.

eamodio commented 1 year ago

@felipecrs thanks -- I haven't had a chance to look at that PR yet as we are focused on getting GitLens 13 out early next week. But I did want to mention that built-in remote providers can provide their own tokenization/parsing for autolinks, see https://github.com/gitkraken/vscode-gitlens/blob/6db29c1a2af6312478a006e02286a6af3d65da63/src/git/remotes/github.ts#L56-L122

felipecrs commented 1 year ago

@eamodio Thanks for the heads up. This is really cool and I could definitely make use of it to fix the Gerrit specific issue.

However, it would be even nicer if we could get the Support user-defined regex for auto-links as we could solve many issues at once, including this one for Gerrit.