[Possible Bug] Workflow not executed for pushes to PR branch when base branch contains "+" #25695
-
Maybe it’s just me. And I couldn’t find anything about this via search. Forgive me if I did sth wrong. I have a GH action that should run on pushes and pull requests to a base branch named “develop+ct”. When filtering for this branch name in on.pull_request.branches, the workflow never gets executed. Please see More container by poikilotherm · Pull Request #20 · gdcc/dataverse · GitHub for an example. Is this a bug, a feature or just me being not able to read docs? Thanks for helping! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
The inputs for branch filters aren’t strings, they’re regular expressions (“filter patterns”) of which
The pattern you’ve used would match A complete outline of the filter patterns is listed at the very bottom of the documentation under “Filter pattern cheat sheet” – not obvious if you’re not looking for it! The pattern you’re looking for to match
|
Beta Was this translation helpful? Give feedback.
-
D’oh! Hidden in plain sight. Thank you for bumping my nose into it! Do you think it would be worse adding some notes about this? (like “take care to escape when branch names contain glob chars from the filter pattern matching”) I’d open a PR for that… |
Beta Was this translation helpful? Give feedback.
-
You can definitely propose such a change in the docs repo and see what the documentation team thinks:
github/docsThe open-source repo for docs.github.com. Contribute to github/docs development by creating an account on GitHub. |
Beta Was this translation helpful? Give feedback.
-
Add clarification about glob chars in branch/tag matching
The docs weren't obvious pointing out that it's more than `*` and `**` that migh…t need escaping when using exact matching of branch names containing these characters. <!-- See our CONTRIBUTING.md for information how to contribute. For changes to content in site policy, see the CONTRIBUTING guide in the site-policy repo. We cannot accept changes to our translated content right now. See the contributing.md for more information. Thanks again! Why:Closes #8106 What's being changed:It's a very minimal change with just a few sentences, please see changed files. Check off the following:
Writer impact (This section is for GitHub staff members only):
|
Beta Was this translation helpful? Give feedback.
The inputs for branch filters aren’t strings, they’re regular expressions (“filter patterns”) of which
+
is a special character.The pattern you’ve used would match
developct
,developpct
,developppct
,developpppct
etc.A complete outline of the filter patterns is listed at the very bottom of the documentation under “Filter pattern cheat sheet” – not obvious if you’re not looking for it!
The pattern you’re looking for to match
develop+ct
exactly is:https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet