Skip to content

Commit 740c85b

Browse files
committed
ci(dependabot): prevent dependabot auto-merge
1 parent d3de562 commit 740c85b

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed
Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Dependabot Pull Request Approve and Merge
1+
name: Dependabot Pull Request Rename
22
on: pull_request #_target
33
permissions:
44
pull-requests: write
@@ -32,40 +32,3 @@ jobs:
3232
parensClose="):"
3333
pr_title=$title_pt1$parensOpen$packagename$parensClose$title_pt2
3434
gh pr edit "$PR_URL" --title "$pr_title"
35-
36-
# Auto merge Dependabot PRs for:
37-
# - patch updates on prod dependencies
38-
# - minor updates on dev dependencies
39-
dependabot-auto-merge:
40-
needs: pull-request-title-change
41-
# Only run for Dependabot PRs
42-
if: ${{ github.actor == 'dependabot[bot]' }}
43-
runs-on: ubuntu-latest
44-
steps:
45-
- name: 'Do not auto-merge'
46-
run: exit 0
47-
48-
- name: 'Fetch Dependabot metadata'
49-
id: dependabot
50-
uses: dependabot/fetch-metadata@v2
51-
52-
- name: 'Check auto merge conditions'
53-
id: auto-merge
54-
if: |
55-
(
56-
steps.dependabot.outputs.update-type == 'version-update:semver-patch' &&
57-
contains('direct:production,indirect:production', steps.dependabot.outputs.dependency-type)
58-
) || (
59-
contains('version-update:semver-minor,version-update:semver-patch', steps.dependabot.outputs.update-type) &&
60-
contains('direct:development,indirect:development', steps.dependabot.outputs.dependency-type)
61-
)
62-
run: echo "::notice ::auto-merge conditions satisfied"
63-
64-
- name: 'Approve and merge PR'
65-
if: ${{ steps.auto-merge.conclusion == 'success' }}
66-
run: |
67-
gh pr review --approve "$PR_URL"
68-
gh pr merge --auto --squash "$PR_URL"
69-
env:
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)