After setting up a Git Repository Integration, OpsLevel can continuously scan your code repositories and verify all of the operational best practices you’ve defined.
With Repo Grep Checks, you can verify the existence or contents of files or folders in your repo. While Repo File and Repo Search Checks can resolve most use-cases, there are certain circumstances with which Repo Grep Checks can offer additional capabilities. For example:
- Searching multiple specific files
- Searching using glob patterns
- Searching for certain special characters
- Repo Grep checks support exists, fixed-string, regex, and version constraints
You may have a mandate for all services to declare code owners within their repo. While these could exist in a
/CODEOWNERS file, there might be situations where a legacy service define owners in a
.github folder as well. If both of these are permissible, you can use Repo Grep Checks to ensure at least one the files exist:
npm. You can use Repo Grep Checks to make sure this policy is being followed:
Say you have a policy that all Python services can no longer use a deprecated library called
plank. You can use Repo Grep Checks to enforce this policy:
|Predicate||Search Term||File Paths|
Those were just some examples to get the creative juices flowing. But there’s tons more you can do with Repo Grep Checks. If you have any questions, or just come up with some interesting checks you want to share, hit us up at [email protected].
Updated 9 months ago