---
name: set-up-dependabot-updates
description: Sets up GitHub Dependabot so dependency bumps and security fixes arrive as grouped pull requests from a single .github/dependabot.yml. Use when the user wants Dependabot, a dependabot.yml file, grouped npm or pip update PRs, or dependency security alerts turned on.
license: MIT
metadata:
  category: deployment
  tags: "dependabot,github,security"
  author: johnny-bravo
  version: "1.0"
  updated: "2026-11-07"
  status: published
  aliases: "dependabot.yml, dependency updates, security alerts, grouped update PRs"
  source_url: "https://github.com/github/awesome-copilot/tree/5269f7ea2d6c3a9bfda5ed878b6726cf509121fd/skills/dependabot"
  source_license: MIT
  copyright: "Copyright GitHub, Inc."
  original_author: "GitHub awesome-copilot contributors (dependabot)"
  modified: "Adapted by TheSkillVault: rewritten as a beginner setup for one dependabot.yml (ecosystems, groups, cooldown, private registries); dropped the Copilot plugin and MCP scanning guide; added secrets handling, gotchas and done-when."
  imported_on: "2026-11-07"
---

# Set up Dependabot updates

Dependabot opens pull requests when your libraries have a newer version or a known vulnerability. One config file controls the version PRs. Security alerts are a separate switch in the repo settings.

## When to use
- The repo has a lockfile and nobody is bumping libraries.
- Update pull requests are noisy and you want them grouped.
- You want alerts when a dependency has a known vulnerability.

## When not to use
- You need the test workflow that runs on each pull request. That is a different setup.
- You are doing one planned major upgrade by hand. Dependabot should not be the only plan for that.

## Steps
1. Turn on the three Dependabot switches in the repo settings (alerts, security updates, and grouped security updates). Version PRs still need the file in the next step.
2. Add `.github/dependabot.yml` on the default branch. GitHub reads this path only. There is no second config file.
3. List each ecosystem you actually have. npm, pnpm and yarn all use `package-ecosystem: npm`. Use `pip` or `uv` for Python, `docker` for a Dockerfile, and `github-actions` for workflow files.
4. Point each entry at the folder that holds the manifest. `directory: "/"` is the repo root. Globs such as `/apps/*` belong under `directories` (plural). The singular key does not expand globs.
5. Schedule version PRs weekly, and cap how many can sit open. Group minor and patch bumps so one PR covers many small libraries. Leave major bumps ungrouped so a breaking change is reviewed alone.
6. Add a short cooldown on version bumps so a release that is a few hours old is not applied the same day. Security updates ignore the cooldown.
7. If a package comes from a private registry, put the token in a GitHub Actions secret and reference it from `registries`. Do not paste the token into the yaml.
8. Open a test PR by merging the config, then check the Insights or Dependabot tab. Rebase a stale PR with a comment of `@dependabot rebase`. Merge with the GitHub button or `gh pr merge`.

```yaml
version: 2
updates:
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: weekly
      day: monday
    open-pull-requests-limit: 5
    cooldown:
      default-days: 4
    groups:
      safe-bumps:
        patterns: ["*"]
        update-types: ["minor", "patch"]
```

## Gotchas
- A dependency listed in both `allow` and `ignore` is ignored. Ignore wins.
- `open-pull-requests-limit: 0` turns off version PRs. It does not turn off security alerts.
- Setting `target-branch` sends version PRs to that branch. Security updates still target the default branch.
- pnpm is not its own ecosystem name. `npm` plus a `pnpm-lock.yaml` is correct.
- A folder with its own lockfile, such as `.github/`, needs its own `updates` entry.
- Never commit a registry token, password or API key. Use `${{secrets.YOUR_TOKEN}}` and a secret that is not printed in logs.

## Portability
This file is for GitHub. If you use GitLab, configure the same idea in Renovate or GitLab dependency scanning. The grouping idea (patch and minor together, majors alone) still applies.

## Done when
- `.github/dependabot.yml` is on the default branch and GitHub shows no config error.
- Alerts are on, and a grouped minor or patch PR appears for at least one ecosystem.
- No registry token is written in the file.

## Example prompt
"Add Dependabot for this npm app. Group minor and patch updates into one weekly PR, and keep major updates separate."

---
Adapted from "dependabot" in github/awesome-copilot (MIT, Copyright GitHub, Inc.). See LICENSE.txt.
