Skip to content

Commit

Permalink
fix: autoapprove and automerge
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] committed Feb 9, 2024
1 parent af31172 commit 1327749
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
interval: 'daily'
34 changes: 17 additions & 17 deletions .github/workflows/dependabot.auto.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Dependabot auto-approve
name: Auto approve and merge PRs by dependabot
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.head.ref, 'dependabot/')
autoapprove:
name: Auto Approve a PR by dependabot
runs-on: ubuntu-22.04
steps:
- name: Git config for actions user
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Auto approve
uses: hmarr/auto-approve-action@v3
if: github.actor == 'dependabot[bot]'

- name: Auto Approve for Dependabot PRs
run: |
gh pr review --approve "$PR_URL"
automerge:
name: Auto merge after successful checks
needs: autoapprove
runs-on: ubuntu-latest
steps:
- name: Auto merge
uses: pascalgn/automerge-action@v0.16.2
if: github.actor == 'dependabot[bot]'
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.TOKEN_GITHUB}}
MERGE_LABELS: dependencies
MERGE_METHOD: rebase

0 comments on commit 1327749

Please sign in to comment.