Branch rules widget is showing incorrect information
Summary
"Branch rules" at Project -> Settings -> Repository is not summarizing the information from "Protected Branches" correctly.
Steps to reproduce
- Go to Project -> Settings -> Repository
- At "Protected branches" click "Expand"
- Add a protected branch: main, Allowed to merge: Developers + Maintainers, Allowed to push and merge: No one
- Reload page
- At "Branch rules" click "Expand"
What is the current bug behavior?
Branch rules says:
- Allowed to merge: 1 role
- Allowed to push and merge: 1 role
What is the expected correct behavior?
Branch rules should say:
- Allowed to merge: 2 roles
- Allowed to push and merge: none
Relevant logs and/or screenshots
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 3.1.5p253 Gem Version: 3.5.17 Bundler Version:2.5.11 Rake Version: 13.0.6 Redis Version: 7.0.15 Sidekiq Version:7.2.4 Go Version: unknownGitLab information Version: 17.4.2 Revision: 2c7e66ebdb6 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 14.11 Using LDAP: yes Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 14.39.0 Repository storages:
- default: unix:/var/opt/gitlab/gitaly/gitaly.socket GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Gitaly
- default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version: 17.4.2
- default Git Version: 2.46.0
