glob matching on branches

I have a dilemma and can’t figure out best way to proceed.  I only want to run tests on branches that aren’t master, develop.  Based on some former threads I saw this:

on:
push:
branches:
-'\*/\*'  
-'\*'  
-'!master' 
- '!develop'

I noticed workflows weren’t getting run for dependabot PRs.  It looks like because the branches are dependabot/npm_and_yarn/sinon-7.5.0.  I see your docs say * doesn’t match ‘/’ but I’m not trying to add all the combos to include branches with n number of /.  Is there a better way to do this? I’d expect you wouldn’t need the positive matches if you just had the ! ones.   

1 Like

It also looks like if it added */*/* to that list it would run master because of /refs/heads/master, so yea I’m stuck here as workflows aren’t ran with dependabot. I know I could add pull_request and omit push.  I think I’m leaning this way but just want to note I don’t like the whole * and */ syntax.  I feel like this should assume match all unless there are entries that negate a match

1 Like