Skip to content

fix(ci): skip codecov and claude-review for Dependabot PRs#5

Merged
bcdonadio merged 4 commits into
masterfrom
fix/dependabot-ci-failures
Nov 2, 2025
Merged

fix(ci): skip codecov and claude-review for Dependabot PRs#5
bcdonadio merged 4 commits into
masterfrom
fix/dependabot-ci-failures

Conversation

@bcdonadio

@bcdonadio bcdonadio commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

Summary

Fixes CI failures on Dependabot PRs #3 and #4 caused by missing GitHub secrets, and prevents failures when workflow files themselves are modified.

Problem

Both Dependabot PRs were failing with two types of CI errors:

  1. Tests & Coverage job failure: Codecov upload and test reporter require secrets which are not available to Dependabot PRs
  2. Claude Code Review failure: Requires CLAUDE_CODE_OAUTH_TOKEN secret which is also unavailable

Additionally, when PRs modify workflow files (like this one), GitHub's security validation prevents the Claude Code Review workflow from running, causing spurious failures.

GitHub restricts access to secrets in Dependabot PRs for security reasons, preventing malicious dependency updates from accessing sensitive credentials.

Solution

This PR implements a comprehensive fix:

For CI Workflow (.github/workflows/ci.yml)

  • Added && github.actor != 'dependabot[bot]' condition to codecov upload and test reporter steps
  • Tests still run and must pass for Dependabot PRs - only secret-dependent reporting steps are skipped

For Claude Code Review Workflow (.github/workflows/claude-code-review.yml)

  • Added job-level condition to skip for Dependabot PRs: if: github.actor != 'dependabot[bot]'
  • Added paths-ignore: - '.github/workflows/**' to prevent the workflow from running when workflow files are modified
    • This avoids GitHub's security validation errors when workflow files themselves are changed
    • The workflow simply won't trigger for such PRs, rather than failing

Changes

  • .github/workflows/ci.yml: Skip codecov and test-reporter steps for Dependabot
  • .github/workflows/claude-code-review.yml: Skip for Dependabot + skip when workflow files modified

Testing

References

Closes #3
Closes #4

🤖 Generated with Claude Code

Fixes CI failures on Dependabot PRs #3 and #4 caused by missing secrets.

GitHub restricts access to secrets in Dependabot PRs for security reasons.
This change:

- Skips codecov upload and test reporter steps for Dependabot PRs
- Skips the entire Claude Code Review workflow for Dependabot PRs
- Tests still run and must pass for Dependabot PRs

This allows automated dependency updates to pass CI while maintaining
security and test coverage requirements.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings November 2, 2025 12:00

Copilot AI 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.

Pull Request Overview

This PR adds conditional logic to skip certain workflow steps when Dependabot opens pull requests, preventing failures due to missing secrets access. Dependabot PRs run with restricted permissions and don't have access to repository secrets.

Key Changes:

  • Added conditional checks to skip workflow steps for Dependabot PRs
  • Removed trailing whitespace from workflow files

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/claude-code-review.yml Added condition to skip entire Claude code review job for Dependabot PRs and removed trailing whitespace
.github/workflows/ci.yml Added Dependabot exclusion to Codecov upload and test reporter steps that require secrets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Nov 2, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

bcdonadio and others added 2 commits November 2, 2025 09:05
The Claude Code Review workflow fails when:
1. The workflow file itself is modified (security validation)
2. Required secrets are unavailable

Adding `continue-on-error: true` makes this check advisory rather than
required, preventing it from blocking valid PRs.

This complements the Dependabot skip condition added earlier.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Using paths-ignore prevents the workflow from running on PRs that modify
workflow files, avoiding GitHub's security validation errors.

This is cleaner than continue-on-error as the check won't run at all
when it would fail validation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings November 2, 2025 12:06

Copilot AI 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.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bcdonadio bcdonadio merged commit c45d59c into master Nov 2, 2025
13 of 14 checks passed
@bcdonadio bcdonadio deleted the fix/dependabot-ci-failures branch November 2, 2025 12:16
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.

2 participants