Skip to content

Fix the problem of `project-template-check`

Song Huang请求将bugfix/project-template-pipeline合并到main-jh

What does this MR do and why?

Related to https://jihulab.com/gitlab-cn/gitlab/-/issues/1788

Follow up !1085 (merged), fixed these problems:

  1. Setup DB environment, solve the problem in https://jihulab.com/gitlab-cn/gitlab/-/jobs/5161007
  2. Job not failed when there already exists a related issue.
  3. Disable WebMock in the pipeline environment
  4. Fix the templates list logic, solve the problem in https://jihulab.com/gitlab-cn/gitlab/-/issues/2141#note_1508692
  5. Fix the HTTP Client problem:
    # Wrong
    jihulab_client.get(..., params: {...})
    jihulab_client.post(..., data: {...})
    
    # Correct
    jihulab_client.get(..., query: {...})
    jihulab_client.post(..., body: "...")

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

JH_PROJECT_TEMPLATE_ENDPOINT=xxx JIHU_REPORTER_TOKEN=xxx JH_PROJECT_TEMPLATE_ASSIGNEE_IDS=xxx bin/rake jh:project_template_check:run
Song Huang 编辑于

合并请求报告

加载中