Update MergeRequestSCMRevision toString to be consistent with GitHub equivalent. #469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.