fix: glab ci status fails for an MR branch, when Merged Results Pipelines are enabled
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Description
The fix adds a "Plan B": when the branch lookup fails, find the merge request and use its pipeline instead. This is exactly the same pattern that MR !1419 (merged) used for the glab ci get
command.
The beauty of this fix is that it's backward compatible - it still works for regular branch pipelines, but now also handles MR pipelines when needed.
Related Issues
Resolves #1017 (closed)
How has this been tested?
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Ashutosh Das