SanderRonde / VSCode-Gerrit

Gerrit plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.vscode--gerrit
MIT License
29 stars 17 forks source link

Checkout feature is broken with Gerrit 3.9.1 #54

Closed lcharlois-neotys closed 8 months ago

lcharlois-neotys commented 8 months ago

Hello,

We upgraded our gerrit server to the latest version (3.9.1) Since that I'm not able to checkout review using the extension.

It looks like the gerrit API has changed.

Before API was returining document like this

{
  "id": "my-repo~develop~Iea56eab37b4b11151c579000fc9fdcffd4b6a4b3",
  "project": "my-repo",
  "branch": "develop", 

now it returns document like this

{
  "id": "my-repo~12318",
  "triplet_id": "my-repo~develop~Icdf3ed8e5f13b8c95f7a3bddc74892fb010ef2ad",
  "project": "my-repo",

What I see in the extension logs let me think this is the cause:

Tried to run "git-review -d "my-repo~12244"", but failed
Stdout: my-repo~12244

Stderr: 

I will say the issue is here coming from this funtion: https://github.com/SanderRonde/VSCode-Gerrit/blob/ad550bb3e62d651980f54c382f1ff8929a7243dd/src/lib/git/git.ts#L294

I will propose a PR to fix that issue.

SanderRonde commented 8 months ago

Version 1.2.25 with the fix is live!

lcharlois-neotys commented 8 months ago

Just to let you know, I've installed the new version and checkout is now fixed. Thanks.

SanderRonde commented 8 months ago

Awesome, thanks for letting me know