Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ env:
jobs:
codecov:
name: Coverage
if: github.event.pull_request.draft == false
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
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.

⚠️ Potential issue | 🔴 Critical

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.

Suggested change
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.

runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 45
steps:
Expand Down
Loading