Skip to content

Fix Claude workflow validation error for bot PRs#453

Merged
lukaszlenart merged 1 commit intomainfrom
fix-claude-workflow-bot-filter
Oct 25, 2025
Merged

Fix Claude workflow validation error for bot PRs#453
lukaszlenart merged 1 commit intomainfrom
fix-claude-workflow-bot-filter

Conversation

@lukaszlenart
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a filter to skip bot PRs in the Claude Code Review workflow
  • Prevents workflow validation errors when bots (like Renovate) modify workflow files

Problem

The Claude GitHub App was failing on PR #452 (and similar bot PRs) with:

Error: Failed to setup GitHub token: Error: Workflow validation failed. 
The workflow file must exist and have identical content to the version 
on the repository's default branch.

This occurs because the Claude App validates that workflow files are identical between the PR and main branch as a security measure. When Renovate or other bots update dependencies in workflow files (e.g., actions/checkout@v4v5), this validation fails.

Solution

Added a conditional filter to skip bot PRs:

if: github.event.pull_request.user.type != 'Bot'

This ensures:

  • ✅ Human-created PRs still get Claude code reviews
  • ✅ Bot PRs (Renovate, Dependabot, etc.) are skipped, avoiding validation errors
  • ✅ Security is maintained by preventing workflow file modifications through the Claude App

Test Plan

🤖 Generated with Claude Code

Add filter to skip bot PRs (especially Renovate) to avoid workflow
validation errors when bots modify workflow files. This prevents the
401 Unauthorized error that occurs when the Claude GitHub App validates
workflow files that differ from the main branch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@lukaszlenart lukaszlenart merged commit e2b920d into main Oct 25, 2025
3 of 4 checks passed
@lukaszlenart lukaszlenart deleted the fix-claude-workflow-bot-filter branch October 25, 2025 16:57
@sonarqubecloud
Copy link
Copy Markdown

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