hashFiles documentation links to misleading description of pattern matching
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
GitHub Actions / Learn GitHub Actions / Expressions, specifically for hashFiles
What part(s) of the article would you like to see updated?
The documentation claims:
You can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see "Workflow syntax for GitHub Actions."
However, the filter pattern cheatsheet does not reflect the matching used by hashFiles in @actions/glob. For example, the cheat sheet says:
?: Matches zero or one of the preceding character.
but you can't get "all JS and JSX files" with **.jsx?. The implementation uses Minimatch (in which it would be .js?(x) rather than .jsx?, except that extended globbing is explicitly disabled).
Additional information
No response
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.
In terms of a more concrete proposal, perhaps:
You can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see Minimatch.
Note: Brace expansion, extended glob matching and pattern negation are disabled. Filenames starting with a period will be matched, even if the pattern does not explicitly have a period in that spot.
Alternatively the rules could be spelled out here, rather than directing to an external resource.
@textbook Thanks for opening an issue and giving us an idea of the change you are expecting. ✨
I'll get this triaged for review! :zap:
Petr Košík
On 2023/06/19 at 16:58, Courtney Wilson @.***> wrote:
@textbook Thanks for opening an issue and giving us an idea of the change you are expecting. ✨
I'll get this triaged for review! ⚡
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hey @textbook, thank you so much for catching this and reporting the issue! And for your patience with us as we work through our backlog. 💛
We recently updated this in the docs here, so I'm going to go ahead and close this issue. Thank you again!