Add target branch in pipeline editor for blank projects
What does this MR do?
For #327082 (closed)
This fixes the bug where, if the user creates a CI file in a blank project from the pipeline editor, the target branch in the commit form is left blank since the repository is empty and doesn't have a default branch yet. In this case, we populate it with the default main
branch in the absence of a default branch.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed.
Edited by Mireya Andres