Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Dependabot auto-approve and auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

- name: Auto-approve and enable auto-merge for npm patch updates (except ignored packages)
if: |
steps.metadata.outputs.package-ecosystem == 'npm' &&
steps.metadata.outputs.update-type == 'version-update:semver-patch' &&
!contains(steps.metadata.outputs.dependency-names, '@atlaskit/pragmatic-drag-and-drop') &&
!contains(steps.metadata.outputs.dependency-names, 'preact') &&
!contains(steps.metadata.outputs.dependency-names, '@preact/signals') &&
!contains(steps.metadata.outputs.dependency-names, 'lottie-web')
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading