fix(ci): stop storybook oversight workflows failing with "No jobs were run" - #1585
Conversation
…e run" Both workflows only declared a pull_request trigger, but something forces them to also run on push (confirmed via the Actions API: every recent run has event=push and 0 jobs). Since push never matches a pull_request-only trigger, every commit produced a zero-job failing run and an email. Add a push trigger and move the packages/react(-native)/** path check from the trigger-level paths filter into an in-job dorny/paths-filter step, gating the build/lint steps on its output. This guarantees a job always registers while still skipping the expensive work when unrelated files change.
|
There was a problem hiding this comment.
🟡 Changes recommended
The new dorny/paths-filter step needs pull-requests: read permissions for PR events and more git history than the default checkout depth to work reliably on push events.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the two Storybook “oversight” GitHub Actions workflows so they no longer fail with “No jobs were run” when invoked on push (e.g. via org rulesets), while still skipping the expensive setup/build/lint work when no relevant package files changed.
Changes:
- Add a
pushtrigger to both oversight workflows so a job always registers when invoked bypush. - Move the
packages/react/**andpackages/react-native/**change detection from trigger-levelpaths:into an in-jobdorny/paths-filtergate, skipping work when irrelevant.
File summaries
| File | Description |
|---|---|
| .github/workflows/react-storybook-oversight.yml | Adds push trigger and gates steps using dorny/paths-filter for packages/react/**. |
| .github/workflows/react-native-storybook-oversight.yml | Adds push trigger and gates steps using dorny/paths-filter for packages/react-native/**. |
Review details
Suppressed comments (2)
.github/workflows/react-native-storybook-oversight.yml:25
dorny/paths-filteruses the GitHub REST API onpull_requestevents and requirespull-requests: readpermission; with the currentpermissions: contents: readthe filter step can fail with 403 and break the workflow.
- name: Check for react-native changes
id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
.github/workflows/react-storybook-oversight.yml:24
dorny/paths-filteruses the GitHub REST API onpull_requestevents and requirespull-requests: readpermission; with the currentpermissions: contents: readthe filter step can fail with 403 and break the workflow.
- name: Check for react changes
id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ths-filter Per Copilot review on #1585: dorny/paths-filter needs pull-requests:read to query PR diffs on pull_request events, and the default checkout fetch-depth of 1 is often insufficient for it to compute the diff/merge base reliably on push events. Bump to fetch-depth: 20.
Summary
react-native-storybook-oversight.ymlandreact-storybook-oversight.ymlonly declared apull_requesttrigger, but something (likely an org-level required-workflow/ruleset enforcement) also invokes them onpush. Confirmed via the Actions API: every recent run of both workflows hasevent: pushand0 jobs.pushnever matches apull_request-only trigger, every commit produced a zero-job failing run and a "No jobs were run" email.pushtrigger to both, and move thepackages/react(-native)/**path check from the trigger-levelpaths:filter into an in-jobdorny/paths-filterstep, gating the setup/build/lint steps on its output. A job now always registers (so the forced push invocation always finds one), while the actual work still only runs when relevant files changed.Test plan
pull_requestrun forreact-storybook-oversight.yml/react-native-storybook-oversight.ymlonly executes the gated steps ifpackages/react/**/packages/react-native/**changed (neither did in this PR, so steps should show as skipped, not absent).main/feature branches to confirm no more "No jobs were run" emails.