pr-review-loopAutonomous PR review loop with Greptile. Use when an agent creates a PR and needs to autonomously handle code review feedback β reading Greptile reviews, fixing issues, pushing fixes, re-triggering review, and auto-merging when score is 4/5+. Trigger on commands like "pr review {url}", "review my PR", or when a Greptile review webhook/poll delivers feedback.
Install via ClawdBot CLI:
clawdbot install cemoso/pr-review-loopAutonomous cycle: Greptile reviews PR β agent fixes feedback β pushes β re-triggers β repeats until score β₯ 4/5 or max rounds.
When triggered with a PR URL or review payload:
# Run the review loop
bash scripts/pr-review-loop.sh <owner/repo> <pr-number>
Or invoke steps manually β see below.
# Get latest Greptile review
gh api "/repos/{owner}/{repo}/pulls/{pr}/reviews" \
--jq '[.[] | select(.user.login == "greptile-apps[bot]")] | last'
# Get inline comments
gh api "/repos/{owner}/{repo}/pulls/{pr}/comments" \
--jq '[.[] | select(.user.login == "greptile-apps[bot]")]'
Look for confidence/quality score in review body. Greptile typically includes a score like Score: X/5 or Confidence: X/5. Extract it:
gh pr merge <number> --merge --delete-branch --repo <owner/repo>
For each Greptile comment:
Commit with a descriptive message listing each fix:
Address Greptile review feedback (round N)
- Fix X in path/to/file.ts
- Fix Y in path/to/other.ts
- Improve Z per reviewer suggestion
Push and re-trigger:
git push
gh pr comment <number> --repo <owner/repo> --body "@greptileai review"
Maintain review-state.json in workspace:
{
"owner/repo#123": {
"rounds": 2,
"maxRounds": 5,
"lastScore": 3,
"sameScoreCount": 1
}
}
Update after each round. Check exit conditions:
Agents should respond to:
pr review β start review loop on a PRpr review β same, by referencepr status β show active review loops and their stateSee references/greptile-patterns.md for common Greptile feedback patterns and fix strategies.
AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Query the DeepWiki MCP server for GitHub repository documentation, wiki structure, and AI-powered questions.
Automated GitHub PR code review with diff analysis, lint integration, and structured reports. Use when reviewing pull requests, checking for security issues,...
Essential Git commands and workflows for version control, branching, and collaboration.
Advanced git operations beyond add/commit/push. Use when rebasing, bisecting bugs, using worktrees for parallel development, recovering with reflog, managing subtrees/submodules, resolving merge conflicts, cherry-picking across branches, or working with monorepos.
Format commit messages using the Conventional Commits specification. Use when creating commits, writing commit messages, or when the user mentions commits, git commits, or commit messages. Ensures commits follow the standard format for automated tooling, changelog generation, and semantic versioning.