Interview Prep/Git & GitHub/GitHub, Actions and Pull Request Issues

Dependabot PRs fail CI because secrets like `NPM_TOKEN` are empty, while human PRs pass.

IntermediateTroubleshootingGitHub, Actions and Pull Request Issues
Answer

Likely causes → Workflows triggered by Dependabot run with Dependabot secrets, not Actions secrets, and get a read-only GITHUB_TOKEN.

Diagnose → github.actor == 'dependabot[bot]' in the failing runs.

Fix → Add the needed values under Settings → Secrets and variables → Dependabot (same names), and for private registries configure them in .github/dependabot.yml under registries:. Grant extra token permissions explicitly in the workflow if needed.

Prevent → Keep a list of secrets required by CI and mirror them in the Dependabot secret store when you add new ones.

All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub, Actions and Pull Request Issues