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?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #46459 (closed)
Edited by Francisco Javier López (ex-Gitlab)