Branch name admin push rule cannot be set due to missing permitted param
Zendesk: https://gitlab.zendesk.com/agent/tickets/82168
The admin push rules page (/admin/push_rule
) has a field for 'Branch name' regex, just like the project push rules page. However, in the admin page if you try to set the 'Branch name' the push rule will be saved without the branch name regex. This is due to a missing permitted parameter in the admin controller.
Compare the admin controller's permitted params at https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/controllers/admin/push_rules_controller.rb#L26-30 to the permitted params in the project controller at https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/controllers/projects/push_rules_controller.rb#L27-30. The former does not contain branch_name_regex
.