Skip to content

fix(ci): auto-review bot-opened PRs, drop manual review dispatch#1366

Merged
absorbb merged 1 commit into
newjitsufrom
fix/ai-review-allow-bot-prs
Jun 22, 2026
Merged

fix(ci): auto-review bot-opened PRs, drop manual review dispatch#1366
absorbb merged 1 commit into
newjitsufrom
fix/ai-review-allow-bot-prs

Conversation

@absorbb

@absorbb absorbb commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Problem

AI Review fails on the automated security-fix PRs (e.g. security/fix-npm-2026-06-22). The 🤖 Run Codex analysis step aborts with:

Error: Actor 'github-actions[bot]' is not permitted to run this action:
Actor 'github-actions[bot]' must have write access to jitsucom/jitsu.
Detected permission: 'none'.

openai/codex-action's write-access pre-check queries the collaborators API, which returns none for the github-actions[bot] actor, so the action exits 1. The previous skip-guard in ai-review.yml checked for jitsu-code-review[bot] — but these PRs are opened under the repo's own GITHUB_TOKEN, i.e. actor github-actions[bot], so the guard never matched and the auto-trigger ran and failed.

Fix

The reusable workflow now passes allow-bots: true to codex-action (jitsucom/github-workflows@1.29.20260622), which whitelists the GitHub-owned github-actions[bot] specifically. The review still posts via the AI_CODE_REVIEW app token (PR write) — the actor check was the only gate.

This PR adopts that on the jitsu side:

  • ai-review.yml: bump the reusable workflow ref 1.28.202605291.29.20260622, and drop the dead skip-guard so bot-opened PRs are reviewed. Draft PRs are still skipped inside the reusable workflow.
  • security-fix.yml: remove the trigger-review job. It manually dispatched the review as a workaround for the failing auto-trigger; now that the auto-trigger works, it would only produce a duplicate review per security PR.

Upstream change

jitsucom/github-workflows@1.29.20260622 — adds allow-bots: true to the codex-action step. allow-bots only trusts github-actions[bot] (repo-internal automation running under the repo's own token), not arbitrary external actors.

🤖 Generated with Claude Code

The AI review failed on the automated security-fix PRs with "Actor
'github-actions[bot]' is not permitted to run this action". codex-action's
write-access check returns permission 'none' for the bot actor and aborts.

The reusable ai-review workflow now passes allow-bots: true to codex-action
(jitsucom/github-workflows@1.29.20260622), so bot-opened PRs are reviewed
normally. Accordingly:

- ai-review.yml: bump the reusable workflow ref to 1.29.20260622 and drop
  the skip-guard (which checked for jitsu-code-review[bot] anyway, while the
  PRs are actually opened by github-actions[bot], so it never matched).
- security-fix.yml: remove the trigger-review job. It manually dispatched
  the review as a workaround for the failing auto-trigger; now that the
  auto-trigger works, it would only produce a duplicate review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@jitsu-code-review jitsu-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed .github/workflows/ai-review.yml and .github/workflows/security-fix.yml for workflow correctness and security impact.

The changes are coherent: the reusable AI-review workflow version now supports bot actors, and removing the manual dispatch from security-fix.yml aligns with the existing PR-triggered AI review path to avoid duplicate review runs. I did not find actionable correctness or security regressions in this patch.

@absorbb absorbb merged commit d270b3e into newjitsu Jun 22, 2026
5 checks passed
@absorbb absorbb deleted the fix/ai-review-allow-bot-prs branch June 22, 2026 14:32
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