insights: allow filtering of an insight by regex string
Created by: coury-clark
We want to be able to filter a backend insight by providing two input regex strings to match repository names:
include
- repo names that match will be included in the result
exclude
- repo names that match will not be included in the result
For a first stab at this we will just modify the GraphQL insights query to accept two new string arguments:
includeRepoRegex
excludeRepoRegex
If either string is null or empty it will not be included as a filter. If both are null or empty there will be no filtering applied.
We can utilize Postgres to do some heavy lifting here, and just modify the query that retrieves the aggregated result.