Skip to content

feat(S01): add ci-pr-review workflow and RULESET.md org setup guide#1

Open
b00ste wants to merge 11 commits intomainfrom
milestone/M001
Open

feat(S01): add ci-pr-review workflow and RULESET.md org setup guide#1
b00ste wants to merge 11 commits intomainfrom
milestone/M001

Conversation

@b00ste
Copy link
Copy Markdown
Member

@b00ste b00ste commented Mar 18, 2026

Summary

Adds org-wide PR review automation via qodo-ai/pr-agent with Claude Opus 4.6.

Changes

.github/workflows/ci-pr-review.yml

Two-job workflow:

  • pr_agent_review — fires on PR open/reopen/sync/ready-for-review, skips drafts and bots, posts review + description + improvement comments automatically
  • pr_agent_commands — fires on issue comments in PRs for slash commands (e.g. /review, /describe)

Model config:

  • Primary: anthropic/claude-opus-4-6 with extended thinking (10240 token budget)
  • Fallback: anthropic/claude-sonnet-4-6
  • Auth via ANTHROPIC_KEY org secret (ANTHROPIC.KEY env var — dot notation required by pr-agent)

RULESET.md

Step-by-step guide for org admins to:

  1. Create the ANTHROPIC_KEY org secret
  2. Configure an org ruleset pointing at this workflow
  3. Test and troubleshoot

Requirements addressed

  • R001 qodo-ai/pr-agent integration ✅
  • R002 Claude Opus 4.6 + API key ✅
  • R003 Sonnet 4.6 fallback ✅
  • R004 PR triggers (opened/reopened/synchronize/ready_for_review) ✅
  • R005 Auto-review/describe/improve ✅
  • R006 Slash commands via issue_comment ✅
  • R007 Draft PR exclusion ✅
  • R008 Org ruleset setup documentation ✅

b00ste added 5 commits March 18, 2026 05:59
- ci-pr-review.yml: two-job workflow with Claude Opus 4.6 + extended thinking,
  auto-review/describe/improve, slash commands, draft/bot exclusion (R001-R007)
- RULESET.md: org admin guide for secret and ruleset setup (R008)
qodo-ai/pr-agent@main is a Docker action — it doesn't accept 'with:' inputs
other than 'entryPoint'/'args'. GITHUB_TOKEN must be passed as an env var.
@b00ste b00ste closed this Mar 18, 2026
@b00ste b00ste reopened this Mar 18, 2026
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

… 4.6

claude-opus-4-6 rejects thinking:{type:enabled,budget_tokens:N} — this API
is deprecated on 4.6 models. Opus 4.6 uses adaptive thinking by default at
high effort, which means it almost always thinks deeply without explicit
budget configuration. Removing config.enable_claude_extended_thinking and
config.extended_thinking_budget_tokens.
@b00ste b00ste closed this Mar 18, 2026
@b00ste b00ste reopened this Mar 18, 2026
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

Anthropic requires temperature=1 when reasoning/thinking is active.
pr-agent defaults to temperature=0.2 + reasoning_effort=medium (adaptive
thinking on 4.6 models) which triggers a 400 from the API.
@b00ste b00ste closed this Mar 18, 2026
@b00ste b00ste reopened this Mar 18, 2026
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

…g_effort injection

pr-agent auto-injects reasoning_effort=medium for Anthropic models, which
LiteLLM translates to thinking params — causing a malformed request that
Anthropic rejects with a vague 400. custom_reasoning_model=true tells
pr-agent to treat the model as a custom/non-reasoning model and skip the
reasoning_effort injection, letting the API call go through cleanly.
@b00ste b00ste closed this Mar 18, 2026
@b00ste b00ste reopened this Mar 18, 2026
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

…ing injection

pr-agent auto-sets reasoning_effort=medium for Anthropic models even with
custom_reasoning_model=true in some versions. LiteLLM translates this to
thinking:{type:adaptive} which Opus 4.6 requires temp=1 for — but the
combination of params it sends causes a malformed 400. Setting
reasoning_effort='' disables the injection entirely; Opus 4.6 still uses
adaptive thinking by default without explicit params.
@b00ste b00ste closed this Mar 18, 2026
@b00ste b00ste reopened this Mar 18, 2026
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

Replace qodo-ai/pr-agent (requires Anthropic API key) with Anthropic's
official claude-code-action which supports Claude Code OAuth tokens from
Max subscriptions. No separate API billing needed.

- Auto-review on PR open/reopen/sync/ready-for-review with structured output
- @claude slash commands in PR comments
- Claude Opus 4.6 model, draft/bot exclusion, concurrency control
- Updated RULESET.md for new secret setup (CLAUDE_CODE_OAUTH_TOKEN)
@b00ste b00ste closed this Mar 18, 2026
@b00ste b00ste reopened this Mar 18, 2026
claude-code-action@v1 doesn't have a 'model' input — pass via claude_args.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant