Skip to content

Fix `expose_url` helper does not include custom base url if it is set

What does this MR do?

Fix a bug where, when base url is set, the method expose_url didn't include it in the resulted url.

Screenshots (if relevant)

Now the resulted urls are:

{
    "id": 1,
    "description": "Autem expedita optio est placeat libero consequuntur officia laboriosam.",
    "name": "Gitlab Test",
    "name_with_namespace": "Gitlab Org / subgroup_gitlab_org / Gitlab Test",
    "path": "gitlab-test",
    "path_with_namespace": "gitlab-org/gitlab-org/gitlab-test",
    "created_at": "2018-02-13T11:45:34.346Z",
    "default_branch": "master",
    "tag_list": [],
    "ssh_url_to_repo": "ssh://user@localhost:2222/gitlab-org/gitlab-org/gitlab-test.git",
    "http_url_to_repo": "http://gitlab.example.com:3000/gitlab/gitlab-org/gitlab-org/gitlab-test.git",
    "web_url": "http://gitlab.example.com:3000/gitlab/gitlab-org/gitlab-org/gitlab-test",
    "avatar_url": null,
    "star_count": 0,
    "forks_count": 0,
    "last_activity_at": "2018-03-07T17:00:19.014Z",
    "_links": {
        "self": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1",
        "issues": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1/issues",
        "merge_requests": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1/merge_requests",
        "repo_branches": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1/repository/branches",
        "labels": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1/labels",
        "events": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1/events",
        "members": "http://gitlab.example.com:3000/gitlab/api/v4/projects/1/members"
    },

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #46459 (closed)

Merge request reports