Skip to content

Commit 01689cc

Browse files
authored
chore: improve dependabot configuration (#619)
- Add grouped dependency updates for root Gradle (ktor, kotlinx, kotlin, kotest, testing, infrastructure, gradle-plugins) - Track all sample projects via `directories: /samples/*` with separate PRs for ktor, kotlin, and mcp-kotlin-sdk - Track npm dependencies in integration tests - Group github actions updates into a single PR ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed
1 parent 961b29b commit 01689cc

2 files changed

Lines changed: 114 additions & 2 deletions

File tree

.github/dependabot.yml

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,109 @@
1-
# Configuration options:
2-
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#about-the-dependabotyml-file
1+
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
2+
# Configuration: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
33

44
version: 2
5+
56
updates:
7+
# Root Gradle project (includes buildSrc)
68
- package-ecosystem: "gradle"
79
directory: "/"
810
schedule:
911
interval: "weekly"
12+
day: "monday"
13+
commit-message:
14+
prefix: "chore(deps):"
1015
labels:
1116
- "dependencies"
1217
- "kotlin"
18+
open-pull-requests-limit: 10
19+
groups:
20+
ktor:
21+
patterns:
22+
- "io.ktor:*"
23+
kotlinx:
24+
patterns:
25+
- "org.jetbrains.kotlinx:*"
26+
kotlin:
27+
patterns:
28+
- "org.jetbrains.kotlin:*"
29+
kotest:
30+
patterns:
31+
- "io.kotest:*"
32+
testing:
33+
patterns:
34+
- "io.mockk:*"
35+
- "dev.mokksy:*"
36+
- "org.awaitility:*"
37+
- "org.junit.jupiter:*"
38+
infrastructure:
39+
patterns:
40+
- "io.netty:*"
41+
- "io.github.oshai:*"
42+
- "org.slf4j:*"
43+
gradle-plugins:
44+
patterns:
45+
- "dev.detekt"
46+
- "org.jetbrains.kotlinx.kover"
47+
- "org.jlleitschuh.gradle.ktlint"
48+
- "org.jetbrains.kotlinx.knit"
49+
- "org.jetbrains.kotlinx.binary-compatibility-validator"
50+
- "org.openapi.generator"
51+
- "org.jetbrains.dokka:*"
52+
- "com.vanniktech:*"
53+
54+
# Samples (independent Gradle builds)
55+
- package-ecosystem: "gradle"
56+
directories:
57+
- "/samples/*"
58+
schedule:
59+
interval: "weekly"
60+
day: "monday"
61+
commit-message:
62+
prefix: "chore(deps):"
63+
labels:
64+
- "dependencies"
65+
- "kotlin"
66+
- "samples"
67+
open-pull-requests-limit: 10
68+
groups:
69+
other-dependencies:
70+
patterns:
71+
- "*"
72+
exclude-patterns:
73+
- "io.ktor*"
74+
- "org.jetbrains.kotlin*"
75+
- "io.modelcontextprotocol*"
76+
77+
# npm (integration tests)
78+
- package-ecosystem: "npm"
79+
directory: "/integration-test/src/jvmTest/typescript"
80+
schedule:
81+
interval: "weekly"
82+
day: "monday"
83+
commit-message:
84+
prefix: "chore(deps):"
85+
labels:
86+
- "dependencies"
87+
- "javascript"
88+
open-pull-requests-limit: 10
89+
groups:
90+
all-dependencies:
91+
patterns:
92+
- "*"
1393

94+
# GitHub Actions
1495
- package-ecosystem: "github-actions"
1596
directory: "/"
1697
schedule:
1798
interval: "weekly"
99+
day: "monday"
100+
commit-message:
101+
prefix: "chore(deps):"
18102
labels:
19103
- "dependencies"
20104
- "github-actions"
105+
open-pull-requests-limit: 10
106+
groups:
107+
all-actions:
108+
patterns:
109+
- "*"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Auto-merge Dependabot
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
auto-merge:
11+
if: github.actor == 'dependabot[bot]'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: dependabot/fetch-metadata@v2
15+
id: metadata
16+
17+
- if: >-
18+
steps.metadata.outputs.package-ecosystem == 'github_actions' ||
19+
steps.metadata.outputs.package-ecosystem == 'npm_and_yarn'
20+
run: gh pr merge --auto --squash "$PR_URL"
21+
env:
22+
PR_URL: ${{ github.event.pull_request.html_url }}
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)