Skip to content

Commit 72cd4fb

Browse files
authored
Merge pull request #484 from DataIntegrationGroup/transfer-fix
transfer-fix
2 parents b807b1d + 5794ffe commit 72cd4fb

File tree

2 files changed

+96
-2
lines changed

2 files changed

+96
-2
lines changed

.github/dependabot.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,44 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "uv" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: "uv"
9+
directory: "/"
1010
schedule:
1111
interval: "weekly"
12+
day: "monday"
13+
time: "09:00"
14+
timezone: "America/Denver"
1215
target-branch: "staging"
16+
open-pull-requests-limit: 5
17+
rebase-strategy: "auto"
18+
labels:
19+
- "dependencies"
20+
- "python"
21+
groups:
22+
uv-non-major:
23+
patterns:
24+
- "*"
25+
update-types:
26+
- "minor"
27+
- "patch"
28+
29+
- package-ecosystem: "github-actions"
30+
directory: "/"
31+
schedule:
32+
interval: "weekly"
33+
day: "monday"
34+
time: "09:00"
35+
timezone: "America/Denver"
36+
target-branch: "staging"
37+
open-pull-requests-limit: 5
38+
rebase-strategy: "auto"
39+
labels:
40+
- "dependencies"
41+
- "github-actions"
42+
groups:
43+
gha-minor-and-patch:
44+
patterns:
45+
- "*"
46+
update-types:
47+
- "minor"
48+
- "patch"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Dependabot auto-merge
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, ready_for_review]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
automerge:
13+
if: github.actor == 'dependabot[bot]' && github.event.pull_request.user.login == 'dependabot[bot]'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Fetch Dependabot metadata
18+
id: metadata
19+
uses: dependabot/fetch-metadata@v2
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
# Auto-approve (only matters if your branch protection requires reviews)
24+
- name: Approve PR
25+
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
26+
uses: actions/github-script@v7
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
script: |
30+
const { data: reviews } = await github.rest.pulls.listReviews({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
pull_number: context.payload.pull_request.number,
34+
});
35+
36+
const alreadyApprovedByBot = reviews.some(
37+
(review) =>
38+
review.state === "APPROVED" &&
39+
review.user?.login === "github-actions[bot]"
40+
);
41+
42+
if (!alreadyApprovedByBot) {
43+
await github.rest.pulls.createReview({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
pull_number: context.payload.pull_request.number,
47+
event: "APPROVE",
48+
});
49+
}
50+
51+
# Enable GitHub auto-merge; it will merge once required checks (your Test Suite) are green
52+
- name: Enable auto-merge (squash)
53+
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
54+
uses: peter-evans/enable-pull-request-automerge@v3
55+
with:
56+
token: ${{ secrets.GITHUB_TOKEN }}
57+
pull-request-number: ${{ github.event.pull_request.number }}
58+
merge-method: squash

0 commit comments

Comments
 (0)