Triggering Greptile PR Reviews

lesson tools active tools/greptile-pr-reviews.md View on GitHub

Triggering Greptile PR Reviews

Rule

Use greptile-helper.sh for all Greptile triggers so re-reviews stay safe, idempotent, and spam-free.

Context

When working on PRs that:

Detection

Observable signals that indicate you need a Greptile re-review:

Pattern

Always route re-reviews through the helper:

# Trigger safely
bash scripts/github/greptile-helper.sh trigger OWNER/REPO PR_NUMBER

# Or inspect state first
bash scripts/github/greptile-helper.sh status OWNER/REPO PR_NUMBER
# Read-only: inspect state before deciding whether to trigger
# Returns: already-reviewed | needs-re-review | in-progress | awaiting-initial-review

Do not use raw comments:

# ❌ Wrong — bypasses anti-spam guards
gh pr comment PR_NUMBER --repo OWNER/REPO --body "@greptileai review"

# ✅ Correct — single enforcement point with all guards
bash scripts/github/greptile-helper.sh trigger OWNER/REPO PR_NUMBER

Critical: One trigger path only. Concurrent sessions and API propagation delay caused real Greptile spam incidents, so direct comments are banned.

The helper centralizes the anti-spam guards:

Greptile should auto-review new PRs. Use the helper only for re-review after improvements, or when the helper explicitly indicates needs-re-review. status is safe for inspection; trigger is the only mutation path.

Outcome

Following this pattern results in:

Benefits:

Related

Match Keywords

trigger greptile re-review after improvements PR received low quality score from greptile validate quality improvements before human review @greptileai review comment @greptileai greptile review greptile PR request greptile review