Interview Prep/GitHub Actions/Workflows Not Triggering & Invalid Files

A workflow with `paths: ['src/**']` did not run for a PR that changed `src/app.js`.

IntermediateTroubleshootingWorkflows Not Triggering & Invalid Files
Answer

Likely causes → The PR changes more than 300 files and src/app.js is not in the first 300 evaluated, the PR is from a branch with a weird base, or another filter (branches) does not match.

Diagnose →

gh pr view 42 --json files --jq '.files | length'
gh pr view 42 --json baseRefName

Fix → Split huge PRs, or drop workflow-level path filters for required workflows and filter at job level.

Prevent → Avoid relying on path filters for correctness; use them for cost only.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflows Not Triggering & Invalid Files