ben-gibson / GitLink

A Jetbrains plugin that opens a local file under Git version control in its remote host using the default browser.
https://plugins.jetbrains.com/plugin/8183-gitlink
MIT License
671 stars 58 forks source link

Add Gerrit #238

Closed reda-alaoui closed 1 year ago

reda-alaoui commented 1 year ago

This change adds Gerrit to the list of out of the box platforms.

reda-alaoui commented 1 year ago

Oups, link to Gerrit changes (aka pull requests) seems to be failing.

ben-gibson commented 1 year ago

Thanks for this, I'm away for the next week, but I'll look to test/merge/deploy it when I'm back.

reda-alaoui commented 1 year ago

Oups, link to Gerrit changes (aka pull requests) seems to be failing.

The issue is perflectly described in #103 . IMO, #103 is marked as fixed but is not.

reda-alaoui commented 1 year ago

@alexandregaldeano , I want to stay consistent with existing code style. Changing the code style should be the object of a separate PR.

reda-alaoui commented 1 year ago

Gerrit does not support pull request workflow style reviews.

Currently, for any platform, GitLink tries to find the local commit on the remote branch to choose between commit url template and branch url template. It makes no sense for Gerrit, because Gerrit changes are not stored on refs/heads/{branchname} but Gerrit special references.

TLDR: on Gerrit, the commit url template must always be used.

Because of that, I added a boolean pullRequestWorkflowSupported to Platform. True by default. If false, the commit url template will always be used instead of the branch url template.

reda-alaoui commented 1 year ago

Thank you !