Indicate whether a branch is protected or not in branch selector
Problem to solve
Users can’t tell if a branch is protected or not when selecting a branch for actions, unless they check it on Settings > Repository page.
Manually running a pipeline against a branch with a different status via "Build > Pipelines > Run Pipeline" can lead to unexpected results.
It is quite common a repository contains a large number of branches, especially for enterprise customers. Users may not always have the complete context about a branch, especially when they need to perform actions on branches they didn't create in the first place.
User experience goal
Users should know whether a branch is protected or not to make informed choices when selecting branches for their actions.
Proposal
We already surface the default
badge in the branch selector. We can apply the same approach and display a protected
badge there similar to the one on the "Code > Branches" page.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.