From 420412df7664c19614c459709b5f856d499c6939 Mon Sep 17 00:00:00 2001 From: Sean Keever <33592180+swkeever@users.noreply.github.com> Date: Fri, 13 Nov 2026 12:04:29 -0500 Subject: [PATCH] ci(ai-review): move a PR back to draft after three failing rounds --- .github/workflows/ai-review.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index 243925f3..b57c517d 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -10,6 +10,8 @@ permissions: {} jobs: ai-review: uses: Kong/volcano-actions/.github/workflows/ai-review.yml@main + with: + hand_off: true permissions: actions: write contents: read @@ -18,3 +20,15 @@ jobs: secrets: anthropic_api_key: ${{ secrets.ANTHROPIC_CI_API_KEY }} codex_access_token: ${{ secrets.CODEX_CI_ACCESS_TOKEN }} + # Moves a PR back to draft after three failing AI review rounds in a row. + # GitHub converts a PR to draft only for a token with contents: write, so + # only this job gets one; it never checks out the PR. See + # Kong/volcano-actions README.md. + hand-off: + needs: ai-review + if: ${{ !cancelled() && needs.ai-review.outputs.hand-off == 'true' }} + uses: Kong/volcano-actions/.github/workflows/ai-review-hand-off.yml@main + permissions: + contents: write + pull-requests: write + statuses: read