-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
I'm not sure how the changeset is created by the git plugin. I see in https://plugins.jenkins.io/git/#changelog-extensions that I can ask it to compare against a specific branch. But this raises the question of what happens when I have
* master | | * my_branch |/ * old_master |
and I compare my_branch with master. I don't know the answer.
It seems to me the git plugin could benefit from using the "Reference build" from the https://plugins.jenkins.io/forensics-api/.
Additionally, when creating a multibranch pipeline with a GitHub branch source I can't really see the "Calculate changelog against a specific branch" option anywhere, I don't think it's available.
The current behaviour makes, for example, the first commit of a new branch lack any changeset at all.
I don’t think the reference build is the right thing to use here. IIRC it defaults to the last build of the target branch that does not have any commits that are not also on the source branch. If a later build of the target branch does have such commits, then it won’t be the reference build, but calculating the changelog against it is still OK. If you calculate the changelog against the reference build, then the changelog can include commits that are on the source branch and also on a later build of the target branch. It would be better to omit those commits from the changelog.