Make the host of project template flexible
What does this MR do and why?
In the JH addition, we already override the preview
of every project template, like:
In the file lib/tasks/gitlab/update_templates.rake
and the file spec/tasks/gitlab/update_templates_rake_spec.rb
, there are some hardcode of the preview
. Currently we skipped this test, but it would be better that enable this test again after they were changed flexibly:
# lib/tasks/gitlab/update_templates.rake
get_commits_response = Gitlab::HTTP.get("https://gitlab.com/api/v4/projects/#{uri_encoded_project_path}/repository/commits",
# spec/tasks/gitlab/update_templates_rake_spec.rb
stub_request(:get, %r{^https://.*/api/v4/projects/gitlab-org%2Fproject-templates%2Frails/repository/commits\?page=1&per_page=1})
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
/cc EM @daveliu
Edited by Song Huang