Skip to content

Commit

Permalink
Merge pull request #3 from reportportal/EPMRPP-91641
Browse files Browse the repository at this point in the history
EPMRPP-91641 || Remove trailing slash from url
  • Loading branch information
pbortnik authored Jul 24, 2024
2 parents b68cc10 + 2089483 commit 317a60d
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ protected Ticket invokeCommand(Integration integration, Map<String, Object> para
ticket.setId(issueId);
ticket.setSummary(name);
ticket.setTicketUrl(
Suppliers.formattedSupplier("{}/boards/{}/pulses/{}", url, boardId, issueId).get());
Suppliers.formattedSupplier("{}/boards/{}/pulses/{}", removeTrailingSlash(url), boardId,
issueId).get());

return ticket;
}
Expand Down Expand Up @@ -182,4 +183,11 @@ private void postBackLinks(PostTicketRQ ticketRQ, MondayClient mondayClient, Str
}));
}

private String removeTrailingSlash(String url) {
if (url.endsWith("/")) {
return url.substring(0, url.length() - 1);
}
return url;
}

}

0 comments on commit 317a60d

Please sign in to comment.