feat: change labeler action for more smarter regex #61946
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
I want to change the labeler action such that it is capable of substring searches, they are the bulk of the labeling rules and very much the smart part of this little workflow, if it can't do semi smart moves then someone will step up and do the hard work; I am looking for better smarter automation
Describe the solution
use this action; pretty much the same, only it's better
see this pr for testing casswedson#68
if I change json and .h or .cpp files it applies
json
andc++
labelsif I change some
data/mods/innawood/
file it adds theinnawod
mods
labels because the have separate rules that happen to meet hereif I change
data/json/deconstruction.json
it adds thecrafting / construction / etc
label cuz it looks for (among others) the substringconstruction
if I change
data/mods/innawood/traps.json
it adds thefurniture / traps
labels cuz it looks for (among others) the substringtraps
there's also the action's output that list the files changed, labeling rules and labels to be applied; very useful https://github.com/casswedson/Cataclysm-DDA/actions/runs/3334016607/jobs/5516537963#step:4:17
also number 2. we did lose a little logic, I am not so sure how to replicate it, in time I'm sure I'll figure it out, I just need to get the heavy work done first
also number 3. this runs on the
pull_request
event now (won't work otherwise) just a noteDescribe alternatives you've considered
Testing
yes
Additional context