Skip to content

ci: skip Claude Code reviewer on Dependabot PRs - #100

Merged
don-petry merged 2 commits into
mainfrom
fix/skip-claude-for-dependabot
Apr 1, 2026
Merged

ci: skip Claude Code reviewer on Dependabot PRs#100
don-petry merged 2 commits into
mainfrom
fix/skip-claude-for-dependabot

Conversation

@don-petry

@don-petry don-petry commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds github.actor != 'dependabot[bot]' condition to the Claude Code workflow's pull_request trigger
  • Prevents the claude check from running (and failing) on Dependabot PRs where CLAUDE_CODE_OAUTH_TOKEN is unavailable
  • Unblocks the dependabot auto-merge workflow when claude is a required status check

Test plan

  • Verify the claude check does not run on Dependabot PRs after merge
  • Verify Claude Code still runs on non-Dependabot PRs and on @claude mentions

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated workflow automation configuration to refine job execution conditions.

The claude workflow fails on Dependabot PRs because secrets
(CLAUDE_CODE_OAUTH_TOKEN) are not available to the dependabot actor.
This blocks the dependabot auto-merge automation when claude is a
required status check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 1, 2026 02:27
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 59 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 59 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6f1599bf-db4b-4714-8634-50f5a3842426

📥 Commits

Reviewing files that changed from the base of the PR and between 129e862 and 2ff1a97.

📒 Files selected for processing (1)
  • .github/workflows/claude.yml
📝 Walkthrough

Walkthrough

The change updates the job-level if condition in .github/workflows/claude.yml to exclude Dependabot-triggered pull requests by adding a check that github.actor is not dependabot[bot].

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/claude.yml
Updated the job-level if condition to additionally exclude Dependabot (github.actor != 'dependabot[bot]') from triggering the job on pull request events, while preserving other event branch logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Add Claude Code GitHub Action #81: Directly modifies the same .github/workflows/claude.yml workflow to further tighten job-level if conditions excluding Dependabot actor.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding a condition to skip the Claude Code reviewer on Dependabot PRs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/skip-claude-for-dependabot

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the Claude Code GitHub Actions workflow to avoid running on Dependabot PRs (where the OAuth token secret isn’t available), preventing the claude check from failing and blocking Dependabot auto-merge.

Changes:

  • Adds a Dependabot exclusion to the claude job’s conditional execution for pull_request events.

Comment thread .github/workflows/claude.yml Outdated
Comment thread .github/workflows/claude.yml Outdated

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/claude.yml:
- Around line 17-19: The PR exclusion condition currently checks github.actor
which can change when maintainers re-open or re-trigger Dependabot PRs; update
the conditional to use github.event.pull_request.user.login instead so the
original PR author (Dependabot) is reliably detected—replace occurrences of
github.actor in the pull_request conditional expression with
github.event.pull_request.user.login to exclude Dependabot PRs consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 43b739b8-64a7-442d-a9e3-588dd096c9a9

📥 Commits

Reviewing files that changed from the base of the PR and between 241b80a and 129e862.

📒 Files selected for processing (1)
  • .github/workflows/claude.yml

Comment thread .github/workflows/claude.yml Outdated
github.actor reflects who triggered the workflow run (e.g. a maintainer
reopening), not the PR author. Use github.event.pull_request.user.login
for reliable Dependabot detection, consistent with dependabot-automerge.yml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Apr 1, 2026

Copy link
Copy Markdown

@don-petry
don-petry merged commit 42e2226 into main Apr 1, 2026
14 of 15 checks passed
@don-petry
don-petry deleted the fix/skip-claude-for-dependabot branch April 1, 2026 02:55
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