RFR: 1269: Handle Jira host with path element in URL

Kevin Rushforth kcr at openjdk.java.net
Tue Dec 7 22:31:42 UTC 2021


On Fri, 3 Dec 2021 22:03:02 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> The IssueTracker/JiraHost classes in Skara make the assumption that the base URL for Jira is just a hostname with no path elements. In order to use Skara with a Jira instance with a URL that has a path element, this needs to be fixed.
>
> Instead of always basing REST call URLs on the configured base path and appending to it, there are many cases where the URIBuilder::setPath is used, which overwrites any existing path element. This is especially troublesome when combined with using IssueProject::webUrl as the base for these URLs.
>
> I would like to fix this by adding a supported way of getting the base URI from an IssueTracker (IssueTracker::uri), replace all uses of ::webUrl for constructing other URLs with this new call, and replacing all ::setPath with ::appendPath (in IssueTracker/Jira related code).
>
> This change will require all configurations to be careful not to add a trailing slash to the URL for the Jira instance.
>
> I intend to run this for a while in the staging environment to make sure it works.

Looks good.

-------------

Marked as reviewed by kcr (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/1251



More information about the skara-dev mailing list