Skip to content

Commit a83672d

Browse files
author
robvalk
committed
URL normalisation corrupts urls where the project name legitimately ends in 'tree/'
1 parent 3632634 commit a83672d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/coravy/hudson/plugins/github/GithubUrl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ private static String normalize(String url) {
2020
if (StringUtils.isBlank(url)) {
2121
return null;
2222
}
23-
// Strip "tree/..."
24-
if (url.contains("tree/")) {
25-
url = url.replaceFirst("tree/.*$", "");
23+
// Strip "/tree/..."
24+
if (url.contains("/tree/")) {
25+
url = url.replaceFirst("/tree/.*$", "");
2626
}
2727
if (!url.endsWith("/")) {
2828
url += '/';

0 commit comments

Comments
 (0)