You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENH: gh-triage-pr — support CodeRabbit alongside Greptile
Phase 3 recognised exactly one reviewer, greptile-apps[bot]. Any other
review bot fell through is_bot() into "bot_other", a bucket the skill
documents as "non-blocking, skip unless explicitly asked". On
Project-MONAI/MONAI#9065 that put a genuine actionable CodeRabbit
finding in the ignore pile; it was only acted on because the raw JSON
was read by hand.
The single GREPTILE_LOGIN constant becomes AI_REVIEW_PROVIDERS, keyed by
bot login and carrying what differs per provider: how a review is
requested, how one is forced for an already-reviewed head, and which
in-repo file indicates the provider is configured. Findings are parsed
per provider and normalised to P1/P2/P3, so CodeRabbit's
Critical/Major/Minor maps onto the vocabulary the phase logic already
speaks and one rule covers both.
Two bugs surfaced while testing this against real PRs.
The greptile parser never matched inline findings. Its pattern was
alt="(P[123])"[^>]*>\s*\*\*([^*]+)\*\*
but the badge is an <img> wrapped in an <a>, so a closing </a> sits
between the badge and the bold title and \s* cannot span it. Most
findings are inline, so Phase 3 has been running "address every P1/P2"
against an empty list. InsightSoftwareConsortium/ITK#6777 reports 0
findings before this change and 2 P1s after.
Provider detection read config files relative to the working directory,
so triaging owner/repo#N from an unrelated checkout reported whatever
that checkout happened to contain. It now queries the target repo.
Unrecognised bots go to a new "bot_unknown" bucket rather than
"bot_other". The two are documented differently on purpose: bot_other is
ignorable, bot_unknown means nobody has classified this bot yet and it
must be read before the phase can be called clean. That is the failure
mode above, closed for the next review bot as well as this one.
phase_3_ai_review also carries CodeRabbit's PR-level signals, merge_risk
and failed_pre_merge_checks, which have no greptile equivalent and no
inline comment to hang off. On Project-MONAI/MONAI#9067 merge_risk was
"High" with zero inline findings — a credential-exposure issue in a
workflow that would otherwise have been reported as Phase 3 clean.
phase_3_greptile is retained as an alias so callers written against the
old report keep working. ghtp_reply.py is untouched: replying and
resolving are provider-agnostic.
Verified against ITK#6714 and ITK#6777 (greptile) and MONAI#9065 and
MONAI#9067 (coderabbit); test_ghtp_workstate.py still passes.
purpose: 'Triage one or more GitHub pull requests in a strict priority order: (1) address human reviewer comments first, (2) fix CI failures second, (3) request and address a @greptileai draft review third — only after all draft CI builds are green, (4) finally recommend marking the PR ready for review.'
3
+
version: 1.1.0
4
+
purpose: 'Triage one or more GitHub pull requests in a strict priority order: (1) address human reviewer comments first, (2) fix CI failures second, (3) address the AI-reviewer findings for the repo (greptile or coderabbit) third — only after all CI builds are green, (4) finally recommend marking the PR ready for review.'
5
5
description: >-
6
6
Triage one or more GitHub pull requests in a strict priority order:
7
7
(1) address human reviewer comments first, (2) fix CI failures second,
8
-
(3) request and address a @greptileai draft review third — only after
9
-
all draft CI builds are green, (4) finally recommend marking the PR
8
+
(3) address the AI-reviewer findings for the repo (greptile or
9
+
coderabbit) third — only after all CI builds are green, (4) finally recommend marking the PR
10
10
ready for review. Use this skill whenever the user says: "gh-triage-PR",
0 commit comments