Skip to content

Draft: Fix missing pipeline statuses

Lee Tickett requested to merge 362231-fix-missing-pipeline-statuses into master

What does this MR do and why?

Related to #362231

When using rules with pipelines, the commits tab of a merge request will not always show relevant pipeline statuses (yet they do appear on the pipelines tab).

This MR ensures that we look for a commit pipeline if we don't find a match for the ref.

Screenshots or screen recordings

Before:

Screenshot_2022-09-12_at_13.09.22

After:

Screenshot_2022-09-12_at_13.11.51

How to set up and validate locally

  1. Create or find a project with autodevops enabled or a simple .gitlab-ci.yml without rules
  2. Raise a merge request with a random change (you should see the commit and pipeline on the MR aok)
  3. Push a change to the .gitlab-ci.yml something along the lines:
    something:
      script: echo hello
      rules:
        - if: $CI_MERGE_REQUEST_IID
  4. You should hopefully not see the pipeline status on the commits tab?

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lee Tickett

Merge request reports