Skip to content

Commit 32b2521

Browse files
authored
Update MergeRequestSCMRevision toString to be consistent with GitHub equivalent. (#469)
1 parent 81a8573 commit 32b2521

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/io/jenkins/plugins/gitlabbranchsource/MergeRequestSCMRevision.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ protected int _hashCode() {
5656

5757
@Override
5858
public String toString() {
59-
return (isMerge() ? ((BranchSCMRevision) getTarget()).getHash() + "+" : "") + origin.getHash();
59+
String result = origin.getHash();
60+
if (isMerge()) {
61+
result += "+" + ((BranchSCMRevision) getTarget()).getHash();
62+
}
63+
return result;
6064
}
6165
}

0 commit comments

Comments
 (0)