Fix inconsistent `branch?` behavior between Ci::Pipeline and Ci::Build
What does this MR do?
This causes a bug in this code in BuildRunnerPresenter
.
specs << refspec_for_merge_request if merge_request?
if git_depth > 0
specs << refspec_for_branch(ref) if branch?
specs << refspec_for_tag(ref) if tag?
else
branch?
becomes true even if it's a merge request pipeline.
What are the relevant issue numbers?
Related: https://gitlab.com/gitlab-org/gitlab-ee/issues/7380
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Kamil Trzciński (Back 2025-01-01)