evanchueng / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
0 stars 0 forks source link

Upload code-review comments over ssh #602

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
My script to give negative reviews to changes with improper commit messages[1] 
is working well.  As a next step, I'd like to pass changes through a tool like 
checkstyle[2] to verify that they meet my company's coding standards.

It'd be nice if the script could put in-line comments for where it finds 
problems (this line has tabs, spacing is incorrect here, etc).  Is this 
currently only possible with json?  I can probably make that work, is there any 
documentation?  If not, where can I find more about the format?  I can upload 
some documentation.

Doing this over ssh would be preferable, but I'm not sure about the interface.  
Putting all the comments on the command line worries me.  Escaping the strings 
correctly is a huge pain, as I found in [1].

[1] https://review.source.android.com//#change,15177
[2] http://checkstyle.sourceforge.net/

Original issue reported on code.google.com by bklarson@gmail.com on 18 Jun 2010 at 9:26

GoogleCodeExporter commented 9 years ago
Maybe we should teach the review command a new --json-input
flag, that if passed causes it to read a structured JSON
object from stdin.  Then you can feed it your high level
commands and line-level comments in JSON:

  {message: "Seems OK",
   verified: "+1",
   comments: [
     {file: "src/README",
      line: 5,
      message: "Spelling error"},
     {file: "src/Makefile",
      line: 70,
      message: "warning: Don't use /bin/sh, use $(SHELL)"}
   ]}

Original comment by sop@google.com on 18 Jun 2010 at 10:18

GoogleCodeExporter commented 9 years ago
+1, lgtm.  Would we deprecate the message and review score options from review 
command?  If not, do we need to handle duplicate/conflicting options?

Original comment by bklarson@gmail.com on 19 Jun 2010 at 1:34

GoogleCodeExporter commented 9 years ago
No, I wouldn't deprecate the command line options.

So we'd need to have a check in the command that
makes sure you don't use the existing options at
the same time as this new --json-input option.

Original comment by sop@google.com on 19 Jun 2010 at 1:39

GoogleCodeExporter commented 9 years ago
Issue 1269 has been merged into this issue.

Original comment by sop@google.com on 22 Feb 2012 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by sop@google.com on 22 Feb 2012 at 9:48

GoogleCodeExporter commented 9 years ago
Is this being actively worked on?

Original comment by dal...@meetme.com on 7 Mar 2013 at 2:55

GoogleCodeExporter commented 9 years ago
Not sure about ssh, but with latest Gerrit master there is a REST API that 
allows to upload comments via http [1].

[1] 
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-r
eview

Original comment by edwin.ke...@gmail.com on 7 Mar 2013 at 3:03

GoogleCodeExporter commented 9 years ago
Link to change uploaded for this issue:
https://gerrit-review.googlesource.com/#/c/58266/

Original comment by mani.cha...@gmail.com on 15 Jul 2014 at 7:37

GoogleCodeExporter commented 9 years ago

Original comment by David.Os...@gmail.com on 15 Jul 2014 at 8:23

GoogleCodeExporter commented 9 years ago

Original comment by sop@google.com on 28 Jul 2014 at 6:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by david.pu...@sonymobile.com on 17 Apr 2015 at 3:08