chore: don't run coverage on dependabot commits#6348
Conversation
WalkthroughModifies the Coverage job in the CI workflow to exclude Dependabot PRs from execution. The condition now checks both that the pull request is not a draft and that the actor is not Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/coverage.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6074
File: src/rpc/methods/chain.rs:55-56
Timestamp: 2025-09-17T11:32:44.185Z
Learning: In the Forest codebase, hanabi1224 prefers that CodeRabbit should not warn about potential compilation issues (such as Send bounds, async/await compatibility, etc.) since they are already guarded by CI tests. Focus should be on higher-level design and logic issues instead.
Learnt from: LesnyRumcajs
Repo: ChainSafe/forest PR: 5907
File: src/rpc/methods/state.rs:523-570
Timestamp: 2025-08-06T15:44:33.467Z
Learning: LesnyRumcajs prefers to rely on BufWriter's Drop implementation for automatic flushing rather than explicit flush() calls in Forest codebase.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build Ubuntu
- GitHub Check: All lint checks
- GitHub Check: Build MacOS
- GitHub Check: cargo-publish-dry-run
- GitHub Check: tests
- GitHub Check: tests-release
- GitHub Check: Build forest binaries on Linux AMD64
- GitHub Check: Coverage
| codecov: | ||
| name: Coverage | ||
| if: github.event.pull_request.draft == false | ||
| if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' |
There was a problem hiding this comment.
Condition will break coverage for non-PR triggers (push, merge_group, workflow_dispatch).
The condition references github.event.pull_request.draft, which only exists for pull_request events. For push, merge_group, and workflow_dispatch events, this context is null, causing the expression to evaluate to false and skipping the job entirely.
This will break coverage reporting for pushes to main and merge groups.
Revise the condition to only apply the draft and dependabot checks when the event is actually a pull_request:
- if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
+ if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && github.actor != 'dependabot[bot]')This allows non-pull_request events to always run, while restricting pull_request events to non-draft, non-dependabot cases.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' | |
| if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && github.actor != 'dependabot[bot]') |
🤖 Prompt for AI Agents
.github/workflows/coverage.yml around line 38: the current if uses
github.event.pull_request.draft which is null for non-pull_request events and
causes the job to skip; change the conditional to only apply the draft and
dependabot checks when the event is a pull_request by making the job run if the
event is not a pull_request OR (it is a pull_request AND pull_request.draft is
false AND actor is not dependabot[bot]); update the if expression accordingly so
push/merge_group/workflow_dispatch always run while pull_request runs only for
non-draft, non-dependabot PRs.
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes
Other information and links
Change checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.