Overview
nOps RecBot is a GitHub App that reviews pull requests that change infrastructure as code. When a pull request touches a resource with an open nOps recommendation, RecBot comments on it, so the engineer making the change sees the savings opportunity while they’re already working on that resource. On each pull request, RecBot posts:- A summary comment listing the recommendations the change touches, with their estimated monthly savings, followed by other open recommendations on resources the repository manages.
- Inline comments on the changed lines that a recommendation applies to.
- A
nOps RecBotcheck with the result. The check is informational: it finishes as success, neutral, or skipped, and never blocks a merge.
It also says how sure it is that the code and the recommendation are about the same resource: Exact match, Likely match (the name is built from variables or modules only known when Terraform runs), or Judged related.
RecBot is in early access. If you don’t see the nOps RecBot card in nOps, contact your nOps account team.
What RecBot reads
RecBot reads Terraform (including.tfvars, local modules, and YAML or JSON config read with yamldecode(file(...))), CloudFormation, AWS CDK, and Kubernetes manifests.
- For each pull request: the diff, plus the infrastructure files the diff only shows part of, such as the rest of a changed module, the variables it sets, and the config files it reads.
- Once per repository, and again after each merge to the default branch: the infrastructure files on the default branch. From these, nOps stores only the list of resources the repository declares (names, IDs, file, and line), not the code.
Permissions
RecBot requests these GitHub App permissions:
RecBot never pushes code, opens pull requests, approves or requests changes, or changes repository settings. You choose which repositories it can see when you install it on GitHub.
Connect RecBot
You need permission to manage integrations in nOps, and permission to install GitHub Apps on the GitHub organization (usually an organization owner).- In nOps, go to Settings → Integrations → Notifications and click the nOps RecBot card.
- GitHub opens. Choose the organization, then All repositories or the repositories you want reviewed, and click Install.
- GitHub returns you to nOps, which links the installation to your nOps account. The card shows GitHub connected.
When RecBot reviews
RecBot reviews a pull request when it’s opened, updated with new commits, reopened, or marked ready for review. It skips:- Draft pull requests, until they’re marked ready for review.
- Pull requests from forks, since anyone can open those.
clara run (or /clara run, or clara review) on it, or click Re-run on the nOps RecBot check. Both need write access to the repository.
Disconnect
Uninstall the App on GitHub (your organization’s Settings → GitHub Apps → nOps RecBot → Uninstall). nOps marks the connection disconnected and RecBot stops reviewing.Troubleshooting
- No comment on a pull request: Check the
nOps RecBotcheck on the pull request. Skipped gives the reason (draft, fork, or not linked to nOps). No open recommendations touched means nothing in the change has an open nOps recommendation. - “Installation is not linked”: The App was installed from GitHub, not from nOps. Click the nOps RecBot card in nOps to link it.
- A recommendation you expected is missing: RecBot only shows open recommendations. Check that the recommendation is open in nOps and that the resource’s name in the code can be resolved from the repository, not only from values passed in at deploy time.
- The check doesn’t appear at all: Make sure the repository is one of the repositories you chose when installing the App on GitHub.