codetribute
codetribute copied to clipboard
Allow to match on substrings of component names.
#320 wouldn't have needed to be such a massive change if we could, for example, wildcard on component names.
It'd be nice if we could automatically include all the Layout: * and DOM: * components there, that way renaming/reorganizing them wouldn't silently break the tool.
I believe these are translated to search queries against Bugzilla and GitHub, so we are limited to what those support. But, if they support wildcards, then this should be possible.
So the place to start solving this is to research wildcard support in those queries.
Great idea Dustin. I think Bugzilla and the bugzilla-graphql-wrapper provides it.
Below is how I search for a combination of bugs who has Core as product and whose component matches either Layout: * or DOM: *
{
"search": {
"products": "Core",
"fields": ["component"],
"operators": ["MATCHES_REGEX"],
"values": ["(Layout: *)|(DOM: *)"]
},
"paging": {
"page": 0,
"pageSize": 10
}
}
I think we can combine all component that belong in a product with an OR operator, but I haven't found bugzilla component naming standard, can a bugzilla component name contain a regex special character? If so, how do we differentiate a component full name vs regex?
Nice research!
I suspect a bugzilla component name can contain at least .. One common technique is to put / at the beginning and end of a string that should be treated as a regex -- so for example
["air.mozilla.org"]would only matchair.mozilla.org, but["/air.mozilla.org/"]would also matchairXmozillaXorg.