Skip to content

Commit

Permalink
feat: added auto merge (#35)
Browse files Browse the repository at this point in the history
* feat: added auto merge

* feat: added auto merge
  • Loading branch information
theprashantyadav authored Nov 17, 2023
1 parent 383a6c5 commit 0d247d7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/autoapprove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Auto approve and merge PRs by dependabot

on: pull_request

permissions:
pull-requests: write
jobs:
autoapprove:
name: Auto Approve a PR by dependabot
runs-on: ubuntu-latest
steps:
- name: Auto approve
uses: hmarr/auto-approve-action@v2.0.0
# Perform the auto approve action only when the PR is raised by dependabot
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
check_run:
types: [ rerequested, completed ]
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- id: automerge
name: automerge
uses: pascalgn/automerge-action@v0.15.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_FILTER_AUTHOR: 'dependabot[bot]'
MERGE_METHOD: "merge"
MERGE_DELETE_BRANCH: "true"
MERGE_LABELS: "dependencies"
MERGE_REQUIRED_APPROVALS: "2"

0 comments on commit 0d247d7

Please sign in to comment.