Skip to content

Commit 0430f30

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/test-c4215a2b5a
2 parents 30f2094 + feffa03 commit 0430f30

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Dependabot auto-merge
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
auto-merge:
11+
if: github.event.pull_request.user.login == 'dependabot[bot]'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Fetch Dependabot metadata
15+
id: meta
16+
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Enable auto-merge for minor/patch updates
21+
if: |
22+
steps.meta.outputs.update-type == 'version-update:semver-patch' ||
23+
steps.meta.outputs.update-type == 'version-update:semver-minor'
24+
run: gh pr merge --auto --squash "$PR_URL"
25+
env:
26+
PR_URL: ${{ github.event.pull_request.html_url }}
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Label major updates for manual review
30+
if: steps.meta.outputs.update-type == 'version-update:semver-major'
31+
run: gh pr edit "$PR_URL" --add-label "dependencies,manual-review"
32+
env:
33+
PR_URL: ${{ github.event.pull_request.html_url }}
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)