Implement "Block pipelines on protected branches" Closes #30634, #34616, and #33130 See merge request !11910