Use "Pipelines must succeed" only in protected branches

Hi,

Is there any way to enable “Pipelines must succeed” only in protected branches?

I tried to run the jobs only when the target branch is protected. But gitlab doesn’t create the pipeline if it’s empty.

Now I have a dummy job which runs when the target branch is not protected, but it’s a little trick.

I saw this issue: Can accept merge request before external build system completion (#54226) · Issues · GitLab.org / GitLab FOSS · GitLab and seems like allow_merge_if_pipeline_not_present didn’t be developed?

Hi @JoniJnm

there is currently no such feature. I found a feature request here Move Merge Checks, and Merge request approvals settings into protected branch rules (#31130) · Issues · GitLab.org / GitLab · GitLab