Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50783

Support file based comments



    • gerrit-code-review-0.2



      It would be super great to be able to submit a file based (given file + lineno) comments and not only change comments.

      This will enable to make use of gerrit as frontend for managing warnings/errors of build, static code analysis (such as sonar or style) etc...

      As far as I imagine there can be two ways to perform this:

      1. The simple - have an optional array of [

      {file, lineno, comment}

      ] provided to the current API.

      2. The cool - use a transaction syntax such as:

      withGerritReview() {
          gerritAddComment("file1", 12, "bla bla")
          gerritAddComment("file2", 44, "bla bla sdf")
          gerritSetFlag("Code-Review", "+1")

      Please also keep in mind parallel work. I could not understand how the magic of triggering is working due to lack of documentation, however, if a parallel job is invoked it should share the context/state of the parent job so that the parallel job can also add its information, two options here as well:

      1. The simple - parallel job has its own comments, share is only the change information, can be given as standard job parameters.

      2. The super-cool - the parallel job, if called within transaction context will be able to append to the existing transaction, share the change information + the state of transaction.

      Thank you for working on this, I am looking forward to be able to switch.



          alonbl Alon Bar-Lev created issue -
          lucamilanesio Luca Domenico Milanesio made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          lucamilanesio Luca Domenico Milanesio made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          lucamilanesio Luca Domenico Milanesio made changes -
          Released As gerrit-code-review-0.2
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Closed [ 6 ]


            lucamilanesio Luca Domenico Milanesio
            alonbl Alon Bar-Lev
            1 Vote for this issue
            4 Start watching this issue