Skip to content

Commit 943b574

Browse files
authored
Merge pull request #53 from Code-4-Community/45-set-up-dependabot
Configure Dependabot + Documentation
2 parents 4521423 + 900b3d0 commit 943b574

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
assignees:
9+
- "aaronashby"
10+
- "thaninbew"
11+
open-pull-requests-limit: 3
12+
13+
# Enable version updates for Docker
14+
- package-ecosystem: "docker"
15+
directory: "/apps/backend"
16+
schedule:
17+
interval: "weekly"
18+
assignees:
19+
- "aaronashby"
20+
- "thaninbew"
21+
open-pull-requests-limit: 3
22+
23+
# Enable version updates for GitHub Actions
24+
- package-ecosystem: "github-actions"
25+
directory: "/"
26+
schedule:
27+
interval: "weekly"
28+
assignees:
29+
- "aaronashby"
30+
- "thaninbew"
31+
open-pull-requests-limit: 3

DEPENDABOT.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dependabot Workflow
2+
3+
## Overview
4+
5+
Dependabot is a GitHub-native tool that automatically opens pull requests to keep dependencies up to date. Its configuration settings are located in `.github/dependabot.yml`, and runs weekly.
6+
7+
## What Dependabot Updates
8+
9+
- **Node.js dependencies**: Dependencies declared in `package.json` and the lockfile `yarn.lock`
10+
- **Docker dependencies**: Updates base image tags referenced by Dockerfiles (e.g. the one in `apps/backend`)
11+
- **GitHub Actions**: Updates action versions used in workflows in `.github/workflows`
12+
13+
## Schedule and Ownership
14+
15+
Dependabot creates PRs on a **weekly** basis, and automatically assigns the PRs to `aaronashby` and `thaninbew`
16+
17+
## How to Review Dependabot PRs
18+
19+
- Skim the PR title, release notes, and commits
20+
- Check the diff
21+
- Dependency updates often change `package.json` + `yarn.lock` (or only `yarn.lock`).
22+
- Docker updates typically change a `FROM …` line.
23+
- Actions updates usually change `uses: …@vX` pins in workflows.
24+
25+
## Merging Guidelines (suggested)
26+
27+
- **Patch/minor updates**: usually safe to merge once CI passes.
28+
- **Major updates**: prefer a quick manual smoke test and a scan for breaking changes.
29+
- **Lockfile-only updates**: merge if CI passes (these happen due to dependency resolution changes).
30+
31+
## Common Tweaks (edit `.github/dependabot.yml`)
32+
33+
- **Add a separate Docker entry for root compose files**
34+
- Dependabot currently only scans Docker in `/apps/backend`. If you want it to update `docker-compose.dev.yml` at the repo root, add another docker update with `directory: "/"`.
35+
- **Limit PR volume**
36+
- Add `open-pull-requests-limit: <number>` to an update block.
37+
- **Ignore versions**
38+
- Use `ignore:` to skip major versions or specific packages temporarily.
39+
- **Group updates**
40+
- Use `groups:` to bundle related packages (e.g., React, NestJS, Nx) into fewer PRs.
41+
42+
## Troubleshooting
43+
- **CI fails after a bump**
44+
- Check the package’s changelog/release notes and revert/ignore if needed.
45+
- If it’s a tooling bump (Nx/Vite/ESLint/TypeScript), failures often come from peer dependency changes or config deprecations.
46+
- **Dependabot isn’t opening PRs**
47+
- Confirm `.github/dependabot.yml` is on the default branch and syntactically valid.
48+
- Check the repo’s Dependabot alerts/PRs in GitHub for run history and errors.

0 commit comments

Comments
 (0)