d-koppenhagen / vscode-code-review

Create a code review with all your comments in one file
https://marketplace.visualstudio.com/items?itemName=d-koppenhagen.vscode-code-review
MIT License
68 stars 36 forks source link

[feature] send review to gerrit #54

Open robgal519 opened 3 years ago

robgal519 commented 3 years ago

🧩It would be nice to be able to send my comments to gerrit review server

Description

I use gerrit to do review. It would be nice if I could read/write comments from my editor.

As far as I'm aware gerrit has simple API to pull/push comments to the server.

d-koppenhagen commented 3 years ago

Hey, actually I don't know gerrit. Would you mind to explain a bit more in detail how the implementation could look like and what API to use etc?

robgal519 commented 3 years ago

I have found the API for gerrit, and it seems that we have to create simple json request to send review to the server: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review

To do, so we need correct endpoint, but in the simplest version it could be provided by user.

In next version we could query gerrit, to list all reviews, This would enable us to download correct branch for review from gerrit, and send created comments.

So as far as I can see user would have to provide url to review from gerrit ( later we could query gerrit server for all avaliable reviews, so user would not have to exit vscode). Extention would then download the latest version ( it is just git branch, so it should be simple even without using gerrit API, although I'm sure there is query for that) next we should enter diff mode with some branch ( ask user? Default to master? ) User creates comments, and when finished the query is sent to gerrit server to post the comments.

d-koppenhagen commented 3 years ago

Okay. I like the Idea but I think I am still not familiar using gerrit. Also I won't find time for the implementation during the next months I think. Would you like to try it by yourself and send me a PR once it's ready? I can help you when you have questions in terms of how to develop and run the extension locally. But basically all you need is described in the READMEs

robgal519 commented 3 years ago

I have never written any VSCode extension, but I think it could be nice new adventure :D

I can not promise when I will create PR, but I will try to work on it in free time (I think that in next month I could manage more time).