Skip to content

fix(ci): move Dependabot exclusion to job-level if in claude-code-reusable.yml#136

Merged
don-petry merged 2 commits intomainfrom
claude/issue-135-20260415-2324
Apr 16, 2026
Merged

fix(ci): move Dependabot exclusion to job-level if in claude-code-reusable.yml#136
don-petry merged 2 commits intomainfrom
claude/issue-135-20260415-2324

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

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

Summary

  • Moves the dependabot[bot] exclusion from the step-level if on the "Run Claude Code" step to the job-level if on the claude job in .github/workflows/claude-code-reusable.yml
  • Removes the now-redundant step-level if
  • Updates AGENTS.md to accurately describe the corrected skip behavior

Root cause

The claude job was starting on Dependabot PRs (the job-level if didn't exclude them), but the only meaningful step ("Run Claude Code") was gated by a step-level if. With all steps either skipped or trivial, GitHub was marking the job as failed rather than skipped.

Fix

Moving the exclusion condition to the job-level if causes GitHub to mark the entire job as skipped, which satisfies required status checks without a failure signal.

Closes #135

Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Updated GitHub Actions workflow configuration to improve automation handling.
  • Documentation

    • Updated documentation to reflect changes to automated workflow processes.

…sable.yml

The claude job was reporting as failed on Dependabot PRs because the
dependabot[bot] check was at the step level, causing the job to start
but all steps to be skipped. GitHub marks such jobs as failed rather
than skipped.

Move the exclusion to the job-level if condition so the entire job is
properly skipped. Also remove the now-redundant step-level if, and
update AGENTS.md to describe the corrected behavior.

Closes #135

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 15, 2026 23:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8d855ec6-d8d5-4d54-94e8-0314f3e96ee8

📥 Commits

Reviewing files that changed from the base of the PR and between eaa792d and 61915c4.

📒 Files selected for processing (2)
  • .github/workflows/claude-code-reusable.yml
  • AGENTS.md

📝 Walkthrough

Walkthrough

The PR relocates the Dependabot author check from a step-level if conditional to the job-level if condition in the Claude Code reusable workflow, causing the entire job to be skipped—rather than failing—for Dependabot pull requests. Documentation is updated accordingly.

Changes

Cohort / File(s) Summary
Workflow Job-level Conditional
.github/workflows/claude-code-reusable.yml
Moved the dependabot[bot] exclusion check from step-level if to the claude job's top-level if condition for pull_request events, and removed the now-redundant step-level conditional on the "Run Claude Code" step.
Documentation Update
AGENTS.md
Updated documentation to reflect that the Claude Code job is now properly skipped (at the job level) for Dependabot PRs, rather than running with all steps skipped and reporting as failed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: moving Dependabot exclusion from step-level to job-level in the workflow file, which is the core fix.
Linked Issues check ✅ Passed All coding requirements from issue #135 are met: the Dependabot check is moved to job-level if, the step-level if is removed, and other event branches remain unaffected.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objectives: workflow refactoring and documentation updates reflecting the new skip behavior.
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 claude/issue-135-20260415-2324

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@don-petry
Copy link
Copy Markdown
Contributor Author

Self-review complete — the diff is minimal and correct:

  • Job-level if now ANDs github.event.pull_request.user.login != 'dependabot[bot]' into the pull_request branch. Parenthesisation is correct; the issue_comment and pull_request_review_comment branches are unaffected.
  • Step-level if removed — redundant after the job-level fix.
  • AGENTS.md updated to say 'job-level if' and 'shows as skipped' — previously described step-level behaviour and 'reports SUCCESS' which was inaccurate.

No edge cases missed. CI is green on all completed checks; CodeQL and SonarCloud still running.

@don-petry — ready for your review and merge when CI is fully green.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes the Claude Code reusable workflow so Dependabot PRs skip the entire claude job (instead of starting the job and skipping the key step), preventing GitHub from reporting an unintended failure and allowing required checks to be satisfied.

Changes:

  • Moved the dependabot[bot] exclusion from the “Run Claude Code” step-level if to the claude job-level if in the reusable workflow.
  • Removed the now-redundant step-level if on “Run Claude Code”.
  • Updated AGENTS.md to describe the corrected “job skipped” behavior for Dependabot PRs.

Reviewed changes

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

File Description
AGENTS.md Updates documentation to reflect that the Claude Code job (not just a step) is skipped for Dependabot PRs.
.github/workflows/claude-code-reusable.yml Adjusts job-level conditional logic so the claude job is skipped for Dependabot PRs and no longer appears as failed.

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

@sonarqubecloud
Copy link
Copy Markdown

@don-petry don-petry enabled auto-merge (squash) April 16, 2026 00:35
@don-petry don-petry disabled auto-merge April 16, 2026 00:37
@don-petry don-petry merged commit 14d3594 into main Apr 16, 2026
18 of 19 checks passed
@don-petry don-petry deleted the claude/issue-135-20260415-2324 branch April 16, 2026 00:37
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.

fix(ci): Claude Code job fails instead of skipping on Dependabot PRs

2 participants