jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-68543] Support for ChangelogToBranch

Open
#1,400 1 comment 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

We miss the ChangelogToBranchTrait.

It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits.

Actually we must use this code to manually checkout.

checkout([

$class: 'GitSCM',
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
userRemoteConfigs: scm.userRemoteConfigs

// important changes
branches: [[name: "FETCH_HEAD"]],
extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]],
])


With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected.

See also https://issues.jenkins.io/browse/JENKINS-14138 & https://issues.jenkins.io/browse/JENKINS-24638

---
Originally reported by gimler, imported from: Support for ChangelogToBranch


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • label(s): configuration, git, plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

We miss the ChangelogToBranchTrait.

It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits.

Actually we must use this code to manually checkout.



checkout([

$class: 'GitSCM',
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
userRemoteConfigs: scm.userRemoteConfigs

// important changes
branches: [[name: "FETCH_HEAD"]],
extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]],
])



With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected.

See also https://issues.jenkins.io/browse/JENKINS-14138 & https://issues.jenkins.io/browse/JENKINS-24638

Contributor guide

Open the contributing guide

Research direction

The issue names no repository files or tests. Start by locating the GitHub Branch Source checkout integration and compare it with the provided ChangelogToBranch Pipeline snippet, then review JENKINS-14138 and JENKINS-24638. Done means the plugin supports ChangelogToBranch so currentBuild.rawBuild.changeSets is populated and emailext can find commit developers.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, groovy, java
Domain
ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.