Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/gerrit-trigger-plugin
  Commit: 89eca5e009a302ffa76889583e9f9a39b39a69d1
      
https://github.com/jenkinsci/gerrit-trigger-plugin/commit/89eca5e009a302ffa76889583e9f9a39b39a69d1
  Author: Jacob Keller <jacob.e.kel...@intel.com>
  Date:   2016-10-14 (Fri, 14 Oct 2016)

  Changed paths:
    M 
src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTriggerBuildChooser.java
    A 
src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTriggerBuildChooserTest.java

  Log Message:
  -----------
  [JENKINS-38675] use refspec instead of branch name for the revision

Add support to the GerritTriggerBuildChooser enabling it to report the
gerrit change refspec instead of simply reporting the branch this change
is destined to. This improves readability of the resulting changelog
entry on the Jenkins build page, as the user can see exactly which ref
was built.

To do so, we need to not only ask for the revision, but the refname. Add
a context callback in order to determine in a similar way as we do the
revision. Although it might be possible to replace the revision handling
to use git.revParse() on the refname instead, this may not be as
accurate as the change event, so we leave this in place.

The result of this change is that we should see something like:

Revision: <sha1id>
  refs/changes/x/xxxx/x

Instead of

Revision: <sha1id>
  master

The resulting display is easier to understand and more accurately
points out the refname that got built.

Add a test to ensure that this behaves as expected. The current test can
probably be improved as it relies heavily on mock objects and does not
actually generate a trigger event or anything of that sort.

Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com>


  Commit: 670fbe2cadd7c9596d3b023db4a61d0fc982a08a
      
https://github.com/jenkinsci/gerrit-trigger-plugin/commit/670fbe2cadd7c9596d3b023db4a61d0fc982a08a
  Author: Robert Sandell <rsand...@cloudbees.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M 
src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTriggerBuildChooser.java
    A 
src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTriggerBuildChooserTest.java

  Log Message:
  -----------
  Merge pull request #299 from jacob-keller/jk/gerrit-revision-show-refspec

[JENKINS-38675] use refspec instead of branch name for the revision


Compare: 
https://github.com/jenkinsci/gerrit-trigger-plugin/compare/2cb758a4c2bd...670fbe2cadd7

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to