Skip to content

ci: run the Codex review only when the codex-review label is added - #78

Closed
maciejwitowski wants to merge 1 commit into
mainfrom
maciej/codex-review-on-demand
Closed

ci: run the Codex review only when the codex-review label is added#78
maciejwitowski wants to merge 1 commit into
mainfrom
maciej/codex-review-on-demand

Conversation

@maciejwitowski

Copy link
Copy Markdown
Contributor

Why

The Codex reviewer ran automatically on every push to every PR. Across the org that added up to 785 runs in August alone (median ~$0.30 per run on gpt-5.6-sol at the measured token volumes), and the OpenAI API key behind it has now been removed over cost — so today every push simply fails this check with "no credits remaining".

What changes

The review becomes user-triggered, on click:

  • The workflow now fires only on pull_request: [labeled], gated on the codex-review label.
  • Adding the label runs one full-PR review, exactly as before (same prompt, same comment posting).
  • A new disarm job removes the label when the review finishes, so the label works as a re-armable button: add it again later for a fresh review of the current head.
  • Nothing runs on push, open, or reopen anymore.

The codex-review label has been created in this repo.

Note

Until a funded OPENAI_API_KEY secret is restored, clicking the label will still produce a failed run — but nothing triggers automatically anymore, so PRs stop collecting a red ✗ on every push in the meantime.

Repo-specific: the draft guard is replaced by the label guard — labeling a draft PR is an explicit ask, so it runs the review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lq4e74miLyjH8aAmt2pH3w

@github-actions github-actions Bot added the ci label Sep 1, 2026
@maciejwitowski
maciejwitowski deleted the maciej/codex-review-on-demand branch September 1, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant