Skip to content

Commit 2ad3b91

Browse files
iciclespiderPatrick J. McNerthney
authored andcommitted
Update MergeRequestSCMRevision toString to be consistent with GitHub equivalent.
1 parent 4c830bc commit 2ad3b91

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)