Wildcard branch protection is supported in the Gitlab UI.
Is it possible to protect branches with wildcard via REST? If I try something like
PUT /api/v3/projects/58/repository/branches/stable-*/protect?developers_can_push=true
I get a HTTP 500 internal server error and my gitlab-rails/production.log
shows
Started PUT "/api/v3/projects/58/repository/branches/stable-*/protect?developers_can_push=true" for 10.10.62.41 at 2016-11-09 10:35:25 +0100
Rugged::ReferenceError (Cannot locate local branch 'stable-*'):
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/gitlab_git-10.6.8/lib/gitlab_git/repository.rb:85:in `[]'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/gitlab_git-10.6.8/lib/gitlab_git/repository.rb:85:in `find_branch'
/opt/gitlab/embedded/service/gitlab-rails/app/models/repository.rb:139:in `find_branch'
...
Is this expected to work?