Invalid URL in the committed link

Issue #104 new
Radoslaw Golebiewski created an issue


I have Jira v8.8.1 server with Jigit 1.5.15. Additionally I have gitlab CE 12.10.3. Both Jira na Gitlab run on the same server on my domain <my domain>.

When I try to configure jigit with my gitlab with:

and then I press the “Test connection” button I get “Connection OK!” (https://<my domain>/gitlab/api/v4/projects/106/repository/branches/master request returns something meaningful). I figured the number out by playing directly with the API in the browser.

When I change path to a proper path:

  • path: <group>/<project name>

I get an error “error: https://<my domain>/gitlab/api/v4/projects/<group>%2F<project>/repository/branches/master . See JIRA log for details.” (the requests returns “{"message":"404 Project Not Found"}”

So if I leave this 106 (project number) then it mostly works. I can select Issues, then select a specific issue and navigate to the Jigit tab. Over there I can see the list of all related git commits. Eg:

<Name> commited to CET-14-testing_script_help_and_readme - 4 days ago
Merge branch 'devel' into CET-14-testing_script_help_and_readme

So far so good. But… the problem is when I click on the commited (https://<my>; domain>/gitlab/106/commit/5eb38495ef5927eb1cf0bae25e2d899c7c41c196) link, which returns “Page not found”. If I change this URL to https://<my domain>/gitlab/<group>/<project name>/commit/5eb38495ef5927eb1cf0bae25e2d899c7c41c196 and paste it in the browser then I get a proper commit contents.

Is it a bug?

Comments (4)

  1. Radoslaw Golebiewski reporter

    It looks like for testing the connection jigit uses invalid REST API request.

    According to it should be /projects/:id/repository/branches:
    https://<my domain>/gitlab/api/v4/<project id, eg. 106>/repository/branches/master

    But the jigit plugin uses:
    https://<my domain>/gitlab/api/v4/<group>/<project name>/repository/branches/master

    which is invalid.

    By looking into I can see that the similar issue is with commits ( which should also use project id (a number) rather than <group>/<project> syntax.

  2. Log in to comment