SanderRonde / VSCode-Gerrit

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

The 'Push for Review' button is not functioning #63

Closed shaochencc closed 7 months ago

shaochencc commented 7 months ago

Why is there no response after clicking the 'Push for Review' button? I've already confirmed that I'm connected to the Gerrit server because I can see the previously merged commits in the repository. Snipaste_2024-04-18_12-26-23

SanderRonde commented 7 months ago

What clicking that command does is really just running git review in your terminal, in addition to a few other git-related things. It does not use the HTTP API since pushing changes through it is not possible. Does running git review normally work for you? I've published a new version of the extension (1.1.30) that should have improved logging and the UI around this feature. Can you check if those logs help you out in any way?

shaochencc commented 7 months ago

If I use the command line, I can submit code for review using git review. However, after clicking the button in this plugin, the code submission wasn't successful. I'll try out your latest version. Thank you!

shaochencc commented 7 months ago

image When I click 'Push for Review,' the error displayed in the image appears

SanderRonde commented 7 months ago

Is there no other visual feedback happening? No popup coming up in the notification center when you click the button? If so I'll make a debug build for you to figure out what's going wrong.

shaochencc commented 7 months ago

When I click the button, a notification pops up in the notification center saying 'Push for Review successful', but in reality, it hasn't been submitted

SanderRonde commented 7 months ago

Not sure what that could be... I've created a debug build for you that can help me answer some questions. Could you install it for me and show me the result of the logs? You can find the logs by, in VSCode, going to Help -> Toggle developer tools and then looking for any logs containing [GERRIT] (you can use the filter up above). I've attached the extension as a .zip file since github doesn't allow uploading of .vsix files. You'll have to rename it to .vsix again and then you can install it in your editor.

Thanks a lot!

vscode--gerrit-1.2.32.zip

shaochencc commented 7 months ago

image According to your request, please help check if the log feedback indicates that the default branch is specified as 'master.' How can I choose the branch I want to submit?

SanderRonde commented 7 months ago

What do you normally use to push for review? The extension just runs git-review without any other arguments. You can test it out by doing that (running git-review) in a terminal and seeing what it says :)

shaochencc commented 7 months ago

Hello! Thanks to your guidance, I've realized that there's no 'master' branch in my repository, which is why my submissions weren't successful. I'll specify the branch for submission in the .gitreview file, as you suggested. Thank you very much for your help! This plugin is really amazing!

SanderRonde commented 7 months ago

Glad to hear you've found the issue, I'll close this issue then. Of course feel free to re-open if it still doesn't work.