Allow glob matches for autolabels and rendered links - #2457
Conversation
b950e2a to
80ddcb9
Compare
| // Create the glob pattern and log an error (should have already been reported to | ||
| // the user). |
There was a problem hiding this comment.
Since this is adding glob patterns to other places, would you mind adding some validation for users in validate_config.rs, similar to this one:
triagebot/src/handlers/check_commits/validate_config.rs
Lines 71 to 90 in 6368d60
If you don't want to do it that's fine, just tell me.
There was a problem hiding this comment.
Ah I didn't know this existed, added a commit changing it. Added a commit changing this though I'm not quite sure how to test. (Feel free to just push if there's something I'm missing)
There was a problem hiding this comment.
Testing requires a setting up triagebot on a repo and sending a PR changing traigebot.toml. I will test it for you.
There was a problem hiding this comment.
Works as expected!
Details
[autolabel."test"]
trigger_files = [
"inva{id"
]
[rendered-link]
trigger-files = ["inva{id"]
exclude-files = ["inva{iid"]
[mentions."inval{id"]
cc = ["Urgau"]The only sub-optimal thing is that we only show one error at a time, but that's pre-existing.
Make it easier to match a set of files against a set of patterns without needing to either collect or repeat the pattern building.
Use the same logic that currently exists for mentions to match
`autolabel.trigger-files` and `render-links.{trigger-files,
exclude-files}`.
|
Thanks! |



Use the same logic that currently exists for mentions to match
autolabel.trigger-filesandrender-links.{trigger-files, exclude-files}.The first commit just moves things around, the rest is less noisy.