Skip to content

Commit 1ce1fa6

Browse files
Added dependabot automation for hello world
1 parent 9ae86b0 commit 1ce1fa6

2 files changed

Lines changed: 91 additions & 0 deletions

File tree

.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+
4+
# ---------------------------
5+
# Python (Poetry via pip)
6+
# ---------------------------
7+
- package-ecosystem: "pip"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"
11+
target-branch: "master"
12+
labels: ["dependencies", "python", "poetry"]
13+
open-pull-requests-limit: 10
14+
ignore:
15+
- dependency-name: "*"
16+
update-types: ["version-update:semver-major"]
17+
18+
# ---------------------------
19+
# NodeJS (root)
20+
# ---------------------------
21+
- package-ecosystem: "npm"
22+
directory: "/"
23+
schedule:
24+
interval: "daily"
25+
target-branch: "master"
26+
labels: ["dependencies", "npm"]
27+
open-pull-requests-limit: 10
28+
ignore:
29+
- dependency-name: "*"
30+
update-types: ["version-update:semver-major"]
31+
32+
# ---------------------------
33+
# NodeJS (sandbox/)
34+
# ---------------------------
35+
- package-ecosystem: "npm"
36+
directory: "/sandbox"
37+
schedule:
38+
interval: "daily"
39+
target-branch: "master"
40+
labels: ["dependencies", "npm", "sandbox"]
41+
open-pull-requests-limit: 10
42+
ignore:
43+
- dependency-name: "*"
44+
update-types: ["version-update:semver-major"]
45+
46+
# ---------------------------
47+
# GitHub Actions
48+
# ---------------------------
49+
- package-ecosystem: "github-actions"
50+
directory: "/"
51+
schedule:
52+
interval: "daily"
53+
target-branch: "master"
54+
labels: ["dependencies", "github-actions"]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Dependabot auto-merge
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize, ready_for_review]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
automerge:
13+
name: Auto-merge Dependabot patch updates
14+
runs-on: ubuntu-latest
15+
16+
# Only run on Dependabot PRs
17+
if: github.event.pull_request.user.login == 'dependabot[bot]'
18+
19+
steps:
20+
- name: Fetch Dependabot metadata
21+
id: meta
22+
uses: dependabot/fetch-metadata@v2
23+
with:
24+
github-token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Approve PR
27+
run: gh pr review --approve "$PR_URL"
28+
env:
29+
PR_URL: ${{ github.event.pull_request.html_url }}
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Auto-merge patch updates only
33+
if: steps.meta.outputs.update-type == 'version-update:semver-patch'
34+
run: gh pr merge --auto --squash "$PR_URL"
35+
env:
36+
PR_URL: ${{ github.event.pull_request.html_url }}
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)