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

Re: Apply branch protection to two branches with entirely different names.

Would love this as well

Community Manager
Message 12 of 24

Re: Apply branch protection to two branches with entirely different names.

Hi @jeffaburt and @trusktr,

 

Thanks for being here, we actually  have an internal issue discussing this possibility and I've added your feedback to it.  Thanks again for reaching out! I'll come back and post any updates here.


Best,
AndreaG

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

Copilot Lvl 3
Message 13 of 24

Re: Apply branch protection to two branches with entirely different names.

@AndreaGriffiths11 

Another +1 for getting this enabled.  

I am preparing a migration of 100+ repos to GitHub Enterprise.  The inability to automate (via REST API) branch protection rules for wildcard patterns (such as release/* and feature/*) is going to be major painpoint for us.  

Ground Controller Lvl 1
Message 14 of 24

Re: Apply branch protection to two branches with entirely different names.

@tadms  I think the wildcard patterns support is already available and documented here: https://help.github.com/en/articles/configuring-protected-branches

 

The request still pending here is for multiple name matches such as a regex OR.   I supposed you could be looking for this?  {release/*,feature/*}   Would this also be supported?

Highlighted
Copilot Lvl 3
Message 15 of 24

Re: Apply branch protection to two branches with entirely different names.

Yes, this is possible through the UI.  But I'm not looking to manually do this 100+ times through the UI. 

 

My request is to have this functionality with the REST API to be able to do this programmatically (originally requested by ksraju-rms in this thread).  

Ground Controller Lvl 1
Message 16 of 24

Re: Apply branch protection to two branches with entirely different names.

Hello! @AndreaGriffiths11 :)

What is the current status of that feature? Where can it be discussed? It would be awesome to be able to use a pattern like `{master,release/*,v[0-9]*}`.

Community Manager
Message 17 of 24

Re: Apply branch protection to two branches with entirely different names.

Thanks for the ping @Zutatensuppe, unfortunately I don't have any updates for you "yet"


Best,
AndreaG

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

Copilot Lvl 2
Message 18 of 24

Re: Apply branch protection to two branches with entirely different names.

I'd really like to be able to apply a single rule to the whole project as well no matter the branch name.

Copilot Lvl 2
Message 19 of 24

Re: Apply branch protection to two branches with entirely different names.

@fishercraigj  Doesn't `*` work?

Copilot Lvl 2
Message 20 of 24

Re: Apply branch protection to two branches with entirely different names.

Not for me.