diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index 83f46a5..33252fe 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -16,6 +16,13 @@ name: Claude Review # cap is reached and runs no review. The job removes the label when it # finishes, so the next request can add it again. # +# A pull request of the merge bot `upkeep-fintermobilityas[bot]` or of +# `dependabot[bot]` counts as a pull request of the repository, so round 1 +# starts for it too. Upkeep merges a pull request of these bots only after +# this review covers the exact head, so the review has to be able to start on +# its own. GitHub gives the login of a bot with `[bot]`; `allowed_bots` takes +# the name without it. +# # A round is one summary comment with the head/findings marker. A run that # fails posts no summary and uses no round. One run at a time per pull request, # so each run counts the rounds after the run before it posted its summary. The @@ -52,7 +59,9 @@ jobs: (github.event.action != 'labeled' && !github.event.pull_request.draft && github.event.pull_request.head.repo.full_name == github.repository && - github.event.pull_request.user.type != 'Bot') + (github.event.pull_request.user.type != 'Bot' || + github.event.pull_request.user.login == 'upkeep-fintermobilityas[bot]' || + github.event.pull_request.user.login == 'dependabot[bot]')) runs-on: ubuntu-latest timeout-minutes: 30 permissions: @@ -164,6 +173,7 @@ jobs: uses: &review-action anthropics/claude-code-action@db77d4d3c98f3f6380e7cd45ffba2342a3dbde3c # v1.0.254 with: &review-inputs anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + allowed_bots: upkeep-fintermobilityas,dependabot # The Claude app token exchange rejects this event's OIDC token, so # Claude comments with the job's own token, as github-actions[bot]. github_token: ${{ github.token }}