docs icon indicating copy to clipboard operation
docs copied to clipboard

hashFiles documentation links to misleading description of pattern matching

Open textbook opened this issue 2 years ago • 4 comments

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

textbook avatar Jun 16 '23 15:06 textbook

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.

welcome[bot] avatar Jun 16 '23 15:06 welcome[bot]

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 avatar Jun 16 '23 16:06 textbook

@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:

cmwilson21 avatar Jun 19 '23 14:06 cmwilson21

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: @.***>

Syndrom-Fnale avatar Jun 19 '23 15:06 Syndrom-Fnale

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!

SiaraMist avatar Nov 08 '23 21:11 SiaraMist