Skip to content

Commit 6ffdc46

Browse files
CopilotbedaHovorka
andcommitted
Skip Claude code review workflow for bot-created PRs
Add conditional check to prevent workflow from running on PRs created by Copilot or other bots. The workflow was failing with "Copilot is not a user" error because the claude-code-action tries to check permissions for the PR author, and bot users like "Copilot" are not recognized as valid GitHub users by the collaborators API. The workflow will now only run for PRs created by human users. Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
1 parent bd48333 commit 6ffdc46

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ on:
1212

1313
jobs:
1414
claude-review:
15-
# Optional: Filter by PR author
16-
# if: |
17-
# github.event.pull_request.user.login == 'external-contributor' ||
18-
# github.event.pull_request.user.login == 'new-developer' ||
19-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
15+
# Skip workflow for bot PRs (Copilot, Dependabot, etc.)
16+
if: |
17+
github.event.pull_request.user.login != 'Copilot' &&
18+
github.event.pull_request.user.type != 'Bot'
2019
2120
runs-on: ubuntu-latest
2221
permissions:

0 commit comments

Comments
 (0)