Display Git changelog as a list of Atlassian Stash (Bitbucket Server) pull requests

66 views
Skip to first unread message

Nickolay Rumyantsev

unread,
Mar 22, 2016, 11:00:40 AM3/22/16
to Jenkins Developers
Hi,

In my company we use Atlassian Stash (now Bitbucket Server) to serve our sources. We use pull requests to merge our features to master branch.
I want to extend the Jenkins Git plugin making it able to display the changelog as a list of Pull Requests with a fallback to usual commits (some automatic direct commits happen).
I took a look in the Git plugin sources I found that the GitChangeSet is a result of parsing of 'git log' command which is stored in plain text in the build dir.
Changelog might be re-parsed every time the build object is collected.
An ideal solution is to create a plugin with a new git scm extension that can decorate the changelog parsing process. As far as I understand the interface of GitSCMExtension doesn't seem to provide the proper entry point. If my guess is not correct could you please suggest the right point to extend? Otherwise, should I create a new extension point somehow?

Thanks,
Nick

Mark Waite

unread,
Mar 23, 2016, 3:27:01 PM3/23/16
to Jenkins Developers
I believe you're correct that there is not an extension point in the git plugin for GitChangeSet.  

There are extension points for BuildChooser (hudson.plugins.git.util.BuildChooser) and Listener (hudson.plugins.git.GitStatus.Listener).  The BuildChooser extension point has been used to create an additional plugin, the Git Chooser Alternative plugin (https://wiki.jenkins-ci.org/display/JENKINS/Git+Chooser+Alternative+Plugin) .  

You might be able to model your proposed changes to the git plugin after BuildChooser and you might be able to use the Git Chooser Alternative as a reference implementation of someone using an extension point to create a new plugin which extends another plugin.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5d3bd90c-3cc3-4950-8f06-26e246a32db5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Waite

unread,
Mar 23, 2016, 3:29:20 PM3/23/16
to Jenkins Developers
There is another build chooser implementation at https://github.com/phemmer/jenkins-git-chooser-build-branches if you'd like to see another example of a plugin that uses the BuildChooser extension point.

Mark Waite

Nickolay Rumyantsev

unread,
Mar 24, 2016, 8:52:19 AM3/24/16
to Jenkins Developers
Thanks Mark!
Now I have to find the time to study all that stuff :)

Regards,
Nick

Tomas Bjerre

unread,
Mar 29, 2016, 5:05:57 AM3/29/16
to Jenkins Developers
Reply all
Reply to author
Forward
0 new messages