gitlab-branch-source-plugin icon indicating copy to clipboard operation
gitlab-branch-source-plugin copied to clipboard

Update MergeRequestSCMRevision toString to be consistent with GitHub equivalent.

Open iciclespider opened this issue 10 months ago • 1 comments

The multibranch-build-strategy-extension plugin makes an assumption about the format of the String returned by the toString method of the ChangeRequestSCMRevision implementation here. It extracts the leading hash value returned by toString.

This works with the github-branch-source plugin because that returns the pull commit first here.

It does not work with this gitlab-branch-source plugin because it returns the merge commit last. This pull request aligns this GitLab implementation with the GitHub implementation, allowing the multibranch-build-strategy-extension plugin to work properly with GitLab.

Testing done

Built and installed this new version on running Jenkins and verified that the GitLab based changes during merge requests are now only automatically triggered when the configured condition matches.

iciclespider avatar Jan 29 '25 09:01 iciclespider