Custom Context & Learning
Personalize Greptile’s behavior with custom rules, style guides, and context.
You can customize Greptile’s behavior by providing “custom context” for the bot to follow. Context can include custom rules, style guides or docs, and miscellanous information that Greptile may find useful.
Each rule, guide, etc. can be scoped to only apply to certain repos and certain filepaths/patterns.
Types of Custom Context
There are three types of custom context:
Custom Rules
You can define rules such as “use loops instead of list comprehension”, and Greptile will enforce this rule across your PRs.
Examples:
Style Guides & Docs
You can point Greptile to your existing style guides and docs, and Greptile will use those as context when reviewing your PRs.
Other Context
There is also free-form space for you to explain any idiosyncracies with your team or codebase to personalize Greptile.
Here is an example:
Scopes
Each type of context, rules, guides, and “other”, can be scoped to apply to specific repos and specific file patterns.
For example, I might want to enforce use of prop types
but only in acme/web_app
and only in files matching the pattern src/frontend/*.tsx
.
If you don’t explicitly define a scope, Greptile will intelligently determine when the rule/stylegude etc. should be applied.
Learning
Greptile can infer rules by observing other developers in your team commenting on PRs, as well as from interaction data such as replies to Greptile comments and 👍/👎 reactions to Greptile comments.
Greptile’s latest learnings can be found on the custom context page on the Greptile dashboard.