#Using GPT for PR Code Review via GitHub Actions or Codex Mentions. Is There a Plus Plan Integrated?

1 messages · Page 1 of 1 (latest)

slender ruin
#

I want to use GPT for PR code reviews when a pull request is created or when a specific action occurs, either through GitHub Actions or by mentioning something like Gemini Code Review.

However, I’m not sure what the best approach is.

From what I’ve found, there seem to be three possible methods:

  1. Using GitHub Actions with openai/codex-action
  2. Using @codex mentions for review requests
  3. Using GitHub Actions with direct OpenAI API calls

But all three seem to require additional API costs.

Assuming I already subscribe to the ChatGPT Plus Plan, is there any option similar to Claude Code Review Action where the cost is integrated into the subscription (or deducted from usage limits), rather than requiring separate API billing?

fallow caveBOT
#

Hi @slender ruin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Great question. Here's a breakdown of your three methods and the subscription situation:

The Three Methods

1. openai/codex-action in GitHub Actions
This uses the Codex CLI in CI/CD pipelines. It requires an OpenAI API key and bills based on token usage — there are no cloud-based features (like GitHub code review) included with this approach. [Codex GitHub Action]

2. @codex mentions in PRs
This is a cloud-hosted feature where you mention @codex review in a PR comment and Codex posts a review. You can also enable Automatic reviews so Codex reviews every new PR without a mention. [Use Codex in GitHub]

3. Direct OpenAI API calls in GitHub Actions
This uses the Chat Completions API directly (e.g., calling gpt-4). It always requires separate API billing, independent of any ChatGPT subscription. [PR Quality Check]


Is There a Plus-Integrated Option?

Yes — Method 2 (@codex mentions) is integrated into your ChatGPT plan, including Plus. Codex cloud features like automatic GitHub code review and @codex mentions are included with ChatGPT Plus, Pro, Business, and Enterprise plans. [Codex Pricing] [Using Codex with Plan]

#

However, there is an important caveat: API key-based usage (Methods 1 and 3) does NOT include cloud-based features like GitHub code review, and is billed separately based on token consumption. The Codex pricing page explicitly notes that API key usage has "No cloud-based features (GitHub code review, Slack, etc.)." [Codex Pricing]


Recommendation

If you want PR code reviews integrated into your ChatGPT Plus subscription (similar to how Claude Code Review works with its subscription):

  1. Connect your GitHub account to ChatGPT via Settings → Connectors in ChatGPT.
  2. Set up Codex Cloud and enable Code review for your repository in Codex settings.
  3. Either mention @codex review in PRs, or enable Automatic reviews to have Codex review every new PR automatically. [Use Codex in GitHub]

This approach uses your Plus plan's usage limits rather than requiring separate API billing.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@slender ruin Kapa.ai is still learning and improving, please let me know how I did by reacting below.

slender ruin
#

@fallow cave Can I provide a custom prompt when using @codex mentions or automatic reviews?

For example, when using @codex review in a PR comment or enabling automatic reviews for all pull requests, is it possible to pass a custom review prompt like we do with Claude Code Review?

Currently, I use a review prompt for Claude Code that looks like this:

  • Enforce strict domain/ ↔ infrastructure/ boundaries
  • Prevent domain/ from importing anything from infrastructure/
  • Verify domain purity (no fetch, Date.now(), process.env, console, etc. inside domain logic)
  • No any types allowed
  • Explicit return types required for exported functions
  • Functional programming conventions preferred (immutability, avoiding for/while, etc.)
  • Review comments must be written in Korean
  • Categorize findings into:
    • [Blocker]
    • [Suggestion]
    • [Question]
  • If there is at least one Blocker → Request Changes
  • Otherwise → Approve
    ... etc

Can something similar be configured for Codex reviews through mentions or automatic reviews?

fallow caveBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Yes, you can provide custom review guidelines for @codex review mentions and automatic reviews — but the mechanism is AGENTS.md, not an inline prompt parameter.

How to Customize Codex Reviews

Codex searches your repository for AGENTS.md files and follows any Review guidelines section you include. [Use Codex in GitHub]

You would add a section like this to your top-level AGENTS.md:

## Review guidelines

- Enforce strict domain/ ↔ infrastructure/ boundaries.
- Prevent domain/ from importing anything from infrastructure/.
- Verify domain purity (no fetch, Date.now(), process.env, console, etc. inside domain logic).
- No `any` types allowed.
- Explicit return types required for exported functions.
- Functional programming conventions preferred (immutability, avoiding for/while, etc.).
- Review comments must be written in Korean.
- Categorize findings into [Blocker], [Suggestion], or [Question].
- If there is at least one Blocker → Request Changes. Otherwise → Approve.

Codex applies guidance from the closest AGENTS.md to each changed file, so you can also place more specific instructions deeper in the directory tree for packages that need extra scrutiny. [Use Codex in GitHub]

One-Off Focus via Comment

For a one-off custom focus without editing AGENTS.md, you can append instructions directly to the @codex review comment:

@codex review for security regressions and domain boundary violations

However, this is limited to a short inline instruction, not a full structured prompt like your Claude example. [Use Codex in GitHub]

Important Limitation

#

The knowledge sources do not explicitly confirm that Codex supports the full conditional logic you described (e.g., "if at least one Blocker → Request Changes, otherwise → Approve" as an automated GitHub review action). The AGENTS.md approach supports guidelines and rules, but whether Codex will strictly enforce the approve/request-changes decision based on your categorization logic is not confirmed in the available documentation.

In summary, AGENTS.md is the primary mechanism for customizing Codex review behavior, and it's well-suited for most of your requirements like domain boundary rules, type constraints, language (Korean), and categorization conventions.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@slender ruin Kapa.ai is still learning and improving, please let me know how I did by reacting below.