Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 6

REST API v3: wildcard branch protection

Solved! Go to Solution.

Is it possible to GET/SET wildcard branch protection using the API?  Querying does not seem to work with wildcards at least, although branches being matched are individually shown as being protected, it doesn't seem possible to tell the difference between ones matching a wildcard, and those with specific settings.

5 Replies
Solution
Moderator
Message 2 of 6

Re: REST API v3: wildcard branch protection

Hi @beiriannydd,

 

Thanks for being here and for asking this question. At this time, this isn't supported. However, we're always working to improve, and we consider every suggestion we receive. I've logged this in our internal feature request list. Though I can't guarantee anything or share a timeline for this, I can tell you that it's been shared with the appropriate teams for consideration.

 

Please let me know if you have any other questions.

 

Cheers!

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Ground Controller Lvl 1
Message 3 of 6

Re: REST API v3: wildcard branch protection

Thanks @nadiajoyce . A use case here would be using the terraform github provider. 

 

https://github.com/terraform-providers/terraform-provider-github/issues/164

Copilot Lvl 2
Message 4 of 6

Re: REST API v3: wildcard branch protection

Unfortunate that the api support didn't come in advance of or with the ux support... makes it hard to take advantage of when programatically creating the repositories on behalf of someone who wont have rights to create the restrictions.  Hopefully it will be coming in the not too distant future.

Ground Controller Lvl 1
Message 5 of 6

Re: REST API v3: wildcard branch protection

This would be a great feature for organizations which have multiple repos and branches.

Copilot Lvl 3
Message 6 of 6

Re: REST API v3: wildcard branch protection

@nadiajoyce - Is there any update on potentially enabling this feature?  This is a significant painpoint for migrating my Organization (130+ repos) to GitHub.  As is, I'm stuck configuring this manually for each repo as we have a hard requirement for wildcard branch protection.  It would be great to be able to automate this.