Configuration
Set who Clara listens to and what she does on a repository with a .github/clara.json file. Everything but reviewing pushes is on by default.
Clara’s settings for a repository live in a .github/clara.json file on its default branch. Everything she does is on by default, apart from reviewing pushes to the default branch, so the file only needs what you want to change. A repository without one gets the defaults.
{
"maintainers": ["octocat", "hubot"],
"pullRequests": { "approve": false, "diagram": false },
"pushes": { "review": true, "ignore": ["apps/web/", "docs/**/*.md"] },
"security": { "secrets": false },
"sweep": false
}
Maintainers
maintainers lists the GitHub logins whose comments, labels, and reviews Clara acts on. See Talking to Clara.
{ "maintainers": ["octocat", "hubot"] }
With none listed, the maintainer is the account that owns the repository, so a personal repository works without a file. A repository an organization owns has to list its maintainers, because an organization’s name isn’t anyone’s login.
Pull requests
| Setting | Off, Clara doesn’t |
|---|---|
pullRequests.review |
Review pull requests as they open and change. A maintainer can still ask with “clara, review this”. |
pullRequests.approve |
Approve. A clean review is posted as a comment instead. |
pullRequests.fix |
Push fixes for what her review finds. The findings are still posted. |
pullRequests.diagram |
Draw how the pieces of a change connect. |
pullRequests.decisions |
Raise choices that are yours to make, or hold an approval for them. |
pullRequests.reviewBots |
Answer what CodeRabbit, Codex, and GitHub code scanning raise on a pull request. |
pullRequests.fixCi |
Fix failed CI on a pull request. |
pullRequests.applyReviews |
Push the changes your review asks for. |
pullRequests.approveForkWorkflows |
Approve the workflow runs GitHub holds for a first-time contributor. They wait for you, and her review says CI is waiting. |
pullRequests.dependabotNodePolicy |
Close a Dependabot update that needs a newer Node than your project supports. |
Commits
Reviewing pushes is the one setting that starts off. Set pushes.review to true to turn it on:
{ "pushes": { "review": true } }
| Setting | Off, Clara doesn’t |
|---|---|
pushes.review |
Review commits pushed straight to the default branch. Off unless you set it to true. |
pushes.fix |
Open a pull request fixing what that review finds. The findings are still posted on the commit. It only matters where pushes.review is on. |
pushes.fixCi |
Fix failed CI on the default branch. |
pushes.ignore lists paths Clara leaves out when she reviews commits pushed to the default branch, such as a site that ships from the same repository:
{
"pushes": {
"review": true,
"ignore": ["apps/web/", "docs/**/*.md", "CHANGELOG.md"]
}
}
A folder, with or without a trailing slash, means everything under it. * matches within one path segment and ** across them. Pushes that only touch ignored paths aren’t reviewed at all. A push that touches other code too is reviewed, without the ignored paths.
Issues
| Setting | Off, Clara doesn’t |
|---|---|
issues.triage |
Triage new issues. |
issues.followUps |
Look again when the reporter answers what she asked. |
issues.questions |
Answer questions about the code, on an issue or a pull request. |
issues.fix |
Fix an issue you label clara: fix or ask her to fix. |
Security
| Setting | Off, Clara doesn’t |
|---|---|
security.codeScanning |
Fix or dismiss code scanning alerts on the default branch, or dismiss one on a pull request. |
security.dependabot |
Update a dependency a Dependabot alert names. |
security.closeStaleFixes |
Close her own fix for an alert that was closed some other way. |
security.socket |
Judge Socket’s dependency alerts. |
security.secrets |
Triage secret scanning alerts. |
security.vulnerabilityReports |
Check private vulnerability reports. |
Errors and releases
| Setting | Off, Clara doesn’t |
|---|---|
sentry.fix |
Fix new Sentry errors. |
sentry.resolveOnMerge |
Resolve the Sentry issue when her fix for it merges. |
releases.announce |
Comment on what a release shipped. |
sweep |
Look once a day for a push to a pull request she missed. |
How the file is read
- From the default branch only. A pull request can’t change the settings it’s handled under, and only people who can push to the default branch can change them.
- Within a minute. A change to the file takes effect about a minute after it lands.
- Forgivingly. A setting whose value isn’t
trueorfalsestays on. A list with an entry that isn’t a login or a path pattern is ignored as a whole. A file that isn’t valid JSON sets nothing, and you get the defaults.