add-to-project icon indicating copy to clipboard operation
add-to-project copied to clipboard

Ability to filter with label wildcards?

Open petemounce opened this issue 3 years ago • 5 comments

We use a hierarchical labelling system where I am. For example, origin/customer/{name-of-customer}, area/product/widget-factory/windows.

I'd really like to have closer control over how to route issues, so that I could, for example, do label: area/product/* and add that to the product-manager triage project, vs area/internal/foo to a different project.

We have quite deep hierarchies; being able to use glob semantics (? for wildcard single character; * for wildcard between /, and; ** for recursively wildcard) would be extremely useful.

Is that something you would support, either by implementing directly, or by accepting an appropriate-quality-standards PR?

petemounce avatar Aug 08 '22 12:08 petemounce

:wave: Hi @petemounce this seems like a really useful improvement. Contributions are generally welcome but I'll defer to @mattcosta7 who's been owning this action 🙇

skw avatar Aug 10 '22 18:08 skw

I think we'd definitely accept regex / glob matching prs

mattcosta7 avatar Aug 10 '22 19:08 mattcosta7

Here's some sudo code to condition on the labels with regex using actions/github-script

- uses: actions/github-script@v6
  id: my-script
  with:
    script: return context.issue.labels.reduce((p,c) => p ? p : c.match(/regex here/g), false)
- run: echo "OK"
  if: steps.my-script.outputs.result

austenstone avatar Aug 12 '22 17:08 austenstone

Thanks for the prior art! I'd prefer to just glob, for the simpler UX. What do others think?

petemounce avatar Aug 13 '22 08:08 petemounce

#182

mervyd avatar Aug 13 '22 17:08 mervyd