Skip to content

Commit ddb184a

Browse files
mackowskijakubmackowskiCopilot
authored
feat(deps): add Dependabot configuration for automated dependency mangement (#4)
* feat(deps): add Dependabot configuration for automated dependency management - Add .github/dependabot.yml with weekly updates for NuGet, GitHub Actions, and Docker - Configure 14-day cooldown periods and pull request limits to prevent spam - Set up conventional commit message prefixes and automatic reviewer assignment - Update documentation in README.md, CHANGELOG.md, and ci-cd-workflows.md - Integrate Dependabot PRs with existing CI/CD pipeline for automated testing * Update CHANGELOG.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: jakubmackowski <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 701c8c1 commit ddb184a

File tree

4 files changed

+152
-2
lines changed

4 files changed

+152
-2
lines changed

.github/dependabot.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
version: 2
2+
updates:
3+
# NuGet dependencies (.NET packages)
4+
- package-ecosystem: "nuget"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
cooldown:
9+
default-days: 14
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "mackowski"
13+
labels:
14+
- "dependencies"
15+
- "nuget"
16+
commit-message:
17+
prefix: "chore(nuget)"
18+
include: "scope"
19+
pull-request-branch-name:
20+
separator: "-"
21+
22+
# GitHub Actions dependencies
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
cooldown:
28+
default-days: 14
29+
open-pull-requests-limit: 5
30+
reviewers:
31+
- "mackowski"
32+
labels:
33+
- "dependencies"
34+
- "github-actions"
35+
commit-message:
36+
prefix: "chore(github-actions)"
37+
include: "scope"
38+
39+
# Docker dependencies (for docker-compose.yml)
40+
- package-ecosystem: "docker"
41+
directory: "/"
42+
schedule:
43+
interval: "weekly"
44+
cooldown:
45+
default-days: 14
46+
open-pull-requests-limit: 5
47+
reviewers:
48+
- "mackowski"
49+
labels:
50+
- "dependencies"
51+
- "docker"
52+
commit-message:
53+
prefix: "chore(docker)"
54+
include: "scope"

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
## 1.8
66

77
### Added
8+
- **Dependabot Configuration**: Automated dependency update management
9+
- Created `.github/dependabot.yml` for automated dependency updates
10+
- Configures weekly updates for NuGet packages (.NET), GitHub Actions, and Docker dependencies
11+
- Includes cooldown periods (14 days) to prevent update spam
12+
- Automatically creates pull requests with conventional commit message prefixes
13+
- Assigns reviewers and applies appropriate labels for dependency updates
14+
- Limits concurrent open pull requests (10 for NuGet, 5 for GitHub Actions and Docker)
815
- **Local Workflow Testing Script**: Script to replicate CI/CD pipeline locally
916
- Created `test-workflow-local.sh` to execute the same test sequence as GitHub Actions
1017
- Runs linting, unit tests, component tests, integration tests, and contract tests
@@ -31,6 +38,8 @@ All notable changes to this project will be documented in this file.
3138
- Updated `README.md` with local workflow testing script documentation
3239
- Enhanced `docs/ci-cd-workflows.md` with local workflow execution guide
3340
- Updated `docs/testing-integration-tests.md` with SSL certificate handling details
41+
- Updated `README.md` with Dependabot dependency management information
42+
- Enhanced `docs/ci-cd-workflows.md` with Dependabot integration details
3443

3544
## 1.7
3645

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ A GitHub App to automate the enforcement of organizational policies and security
1616
- [Prerequisites](#prerequisites)
1717
- [Installation](#installation)
1818
- [Configuration](#configuration)
19-
- [Project Scope](#project-scope)
19+
- [Testing](#testing)
20+
- [Dependency Management](#dependency-management)
2021
- [Documentation](#documentation)
21-
- [Project Status](#project-status)
22+
- [Project Scope](#project-scope)
2223
- [License](#license)
2324

2425
---
@@ -380,6 +381,41 @@ For more details, see **[Testing Strategy](./docs/testing-strategy.md)** and **[
380381

381382
---
382383

384+
## Dependency Management
385+
386+
The project uses [Dependabot](https://docs.github.com/en/code-security/dependabot) to automatically keep dependencies up to date.
387+
388+
### Automated Dependency Updates
389+
390+
Dependabot is configured via `.github/dependabot.yml` and monitors the following:
391+
392+
- **NuGet Packages** (.NET): Weekly updates with conventional commit prefixes (`chore(nuget)`)
393+
- **GitHub Actions**: Weekly updates for workflow action versions (`chore(github-actions)`)
394+
- **Docker Dependencies**: Weekly updates for Docker images in `docker-compose.yml` (`chore(docker)`)
395+
396+
### Configuration Details
397+
398+
- **Update Schedule**: Weekly checks
399+
- **Cooldown Period**: 14 days to prevent update spam and malware
400+
- **Pull Request Limits**:
401+
- NuGet: Up to 10 concurrent PRs
402+
- GitHub Actions: Up to 5 concurrent PRs
403+
- Docker: Up to 5 concurrent PRs
404+
- **Commit Messages**: Follow conventional commit format with scoped prefixes
405+
- **Reviewers**: Pull requests are automatically assigned for review
406+
- **Labels**: Automatic labeling (`dependencies`, `nuget`, `github-actions`, `docker`)
407+
408+
### Managing Updates
409+
410+
Dependabot pull requests automatically run through the same CI/CD pipeline as regular pull requests, including:
411+
- Code formatting checks
412+
- Unit, component, integration, and contract tests
413+
- Code coverage reporting
414+
415+
You can review and merge these updates through the standard pull request process.
416+
417+
---
418+
383419
## Documentation
384420

385421
Detailed documentation for specific features and integrations:

docs/ci-cd-workflows.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
The project uses GitHub Actions for continuous integration and continuous deployment. The main workflow runs on pull requests to ensure code quality, test coverage, and compliance before code is merged.
66

7+
In addition to the pull request workflow, the project uses [Dependabot](https://docs.github.com/en/code-security/dependabot) to automatically manage dependency updates. Dependabot pull requests go through the same CI/CD pipeline as regular pull requests, ensuring all updates are tested before merging.
8+
79
## Pull Request Workflow
810

911
The **Pull Request** workflow (`.github/workflows/pull-request.yml`) is triggered automatically on pull requests to `main` or `develop` branches. It performs checks including code linting, multi-level testing, code coverage reporting, and automatic PR status comments.
@@ -283,6 +285,55 @@ dotnet test \
283285
--logger "console;verbosity=detailed"
284286
```
285287

288+
## Dependabot Integration
289+
290+
The project uses GitHub Dependabot for automated dependency management, configured via `.github/dependabot.yml`.
291+
292+
### Configuration
293+
294+
Dependabot monitors three package ecosystems:
295+
296+
1. **NuGet Packages** (.NET dependencies)
297+
- Weekly update checks
298+
- Up to 10 concurrent pull requests
299+
- Commit message prefix: `chore(nuget)`
300+
- Labels: `dependencies`, `nuget`
301+
302+
2. **GitHub Actions** (workflow action versions)
303+
- Weekly update checks
304+
- Up to 5 concurrent pull requests
305+
- Commit message prefix: `chore(github-actions)`
306+
- Labels: `dependencies`, `github-actions`
307+
308+
3. **Docker Dependencies** (container images)
309+
- Weekly update checks
310+
- Up to 5 concurrent pull requests
311+
- Commit message prefix: `chore(docker)`
312+
- Labels: `dependencies`, `docker`
313+
314+
### Update Behavior
315+
316+
- **Cooldown Period**: 14 days between updates for the same dependency to prevent excessive PRs
317+
- **Automatic Review Assignment**: Pull requests are automatically assigned to designated reviewers
318+
- **Conventional Commits**: All dependency updates follow the conventional commit format for consistency
319+
- **CI/CD Integration**: Dependabot PRs automatically trigger the pull request workflow, running all linting, tests, and coverage checks
320+
321+
### Managing Dependabot PRs
322+
323+
1. **Review**: Each PR includes a changelog and release notes when available
324+
2. **Test**: All PRs run through the full CI/CD pipeline automatically
325+
3. **Merge**: Once approved and tests pass, merge using standard GitHub PR workflow
326+
4. **Bulk Operations**: Use GitHub's "Merge" or "Rebase and merge" options for multiple dependency updates
327+
328+
### Best Practices
329+
330+
- **Regular Reviews**: Review and merge Dependabot PRs regularly to stay current with security patches and features
331+
- **Batch Updates**: Consider batching multiple minor/patch updates together when possible
332+
- **Test Coverage**: All dependency updates are automatically tested, but manual verification is recommended for major version updates
333+
- **Security Updates**: Prioritize security-related dependency updates (Dependabot will label these accordingly)
334+
335+
For more information, see the [Dependabot documentation](https://docs.github.com/en/code-security/dependabot).
336+
286337
## Troubleshooting
287338

288339
### Workflow Failures

0 commit comments

Comments
 (0)