Repository navigation
Behavior of branches filter on existing branches #42813
Description
Activity
- addedcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content team
on Feb 6, 2026 Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
- addedtriageDo not begin working on this issue until triaged by the teamDo not begin working on this issue until triaged by the team
on Feb 6, 2026 Additional Details:
It is evident that the
masterbranch is an exception to this. Details:I had an existing branch named
docs/doc-build-testwith a workflow starting with this:on: push: branches: - master - 'release/*'
Then I added this additional item to the branches filter:
- 'docs/*'to make it:on: push: branches: - master - 'release/*' - 'docs/*'
and NOTHING I did on the existing
docs/doc-build-testbranch triggered the workflow. On a hunch I tried changes on a branchdocs/doc_build_test_2(using underscores) and that worked exactly as predicted, and finally, I deleted the originaldocs/doc-build-testbranch and created a new one from the currentmasterbranch with the exact same name AFTER the workflow update was in place, and THEN AND ONLY THEN did changes on that branch trigger the workflow.My conclusion was that the branch is flagged as eligible upon branch creation based on existing workflows, not as a result of adding or modifying the workflow. Whether this is a correct conclusion or not, I don't know. But now you have the details.
If my conclusion was correct, then I can only guess that the
master(or default) branch is somehow excluded from this.Kind regards,
Vic@vwheeler63 Thanks for letting us know! I'm going to have to check with our engineers and make sure this isn't a bug, but if it's working as intended, it does look like a caveat we would want to include.
Reacted by Victor Wheeler- addedgithub_actionsPull requests that update GitHub Actions contentPull requests that update GitHub Actions contentand removedtriageDo not begin working on this issue until triaged by the teamDo not begin working on this issue until triaged by the team
on Feb 13, 2026 @vwheeler63 Thanks for letting us know! I'm going to have to check with our engineers and make sure this isn't a bug, but if it's working as intended, it does look like a caveat we would want to include.
Agreed! Looking forward to what the engineers have to say.
github-actions commented
on Mar 16, 2026 on Mar 16, 2026 – with GitHub ActionsContributorMore actionsA stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.
- addedInactiveWill be closed automatically by a stall check if no activity is detected.Will be closed automatically by a stall check if no activity is detected.
on Mar 16, 2026 Not stale.
- removedInactiveWill be closed automatically by a stall check if no activity is detected.Will be closed automatically by a stall check if no activity is detected.
on Mar 17, 2026 github-actions commented
on Apr 27, 2026 on Apr 27, 2026 – with GitHub ActionsContributorMore actionsA stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.
- addedInactiveWill be closed automatically by a stall check if no activity is detected.Will be closed automatically by a stall check if no activity is detected.
on Apr 27, 2026 not stale
- removedInactiveWill be closed automatically by a stall check if no activity is detected.Will be closed automatically by a stall check if no activity is detected.
on Apr 29, 2026 A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.
- addedInactiveWill be closed automatically by a stall check if no activity is detected.Will be closed automatically by a stall check if no activity is detected.
on Sep 7, 2026 - addednever-staleDo not close as staleDo not close as staleand removedInactiveWill be closed automatically by a stall check if no activity is detected.Will be closed automatically by a stall check if no activity is detected.
on Sep 8, 2026
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
What part(s) of the article would you like to see updated?
These to parts that describe using a
branchesfilter:Additional information
I just lost about 5 hours trying a large variety of variations and reviewing the docs related to
branchesfilters on GitHub Actions. Here is what I discovered, and I believe this important fact is nowhere in the docs and should be: