Skip to content

Commit

Permalink
Update MergeRequestSCMRevision toString to be consistent with GitHub …
Browse files Browse the repository at this point in the history
…equivalent.
  • Loading branch information
iciclespider authored and Patrick J. McNerthney committed Jan 29, 2025
1 parent 4c830bc commit 2ad3b91
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ protected int _hashCode() {

@Override
public String toString() {
return (isMerge() ? ((BranchSCMRevision) getTarget()).getHash() + "+" : "") + origin.getHash();
String result = origin.getHash();
if (isMerge()) {
result += "+" + ((BranchSCMRevision) getTarget()).getHash();
}
return result;

Check warning on line 63 in src/main/java/io/jenkins/plugins/gitlabbranchsource/MergeRequestSCMRevision.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 59-63 are not covered by tests
}
}

0 comments on commit 2ad3b91

Please sign in to comment.