Hey,

  To support a PR-building workflow, I have a plugin which sets the branch 
used by the Jenkins workspace, to something I configure (which is the 
pr-branch). 
  This happens by using the GitSCM API, a very abbreviated version of what 
happens is this:

   GitTool tool = GitTool.getDefaultInstallation();
   GitClient git = Git.with(listener, 
env).in(workspaceDir).using(tool.getGitExe()).getClient();
   git.fetch("origin", new RefSpec(refspec));
   git.checkout(localBranch);  


   What I would like to do is make the changelog that appears on the build 
page understand that the base branch used is not master (or whatever the 
default branch is that the job was configured to use). Currently, I notice 
the changelog is unaware the branch built from changed, and so it shows the 
wrong commits.

   I have tried to change the BuildData associated with the job, and that 
part at least makes the GitData link that shows on the build page name and 
link to the correct (in this case the PR branch) branch. This doesn't seem 
to be what ChangeLog is looking at though. I took a quick look and the 
changelog logic is kind of complex, so if anyone knows how this works 
that'd be super useful - this must be a thing we can do one way or another. 
thanks :)

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c5041a95-874b-4bed-9130-88305f2acd36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to