Skip to content

Commit

Permalink
Dependabot automerge (#12844)
Browse files Browse the repository at this point in the history
Reduce toil. Will automerge patch and minor updates
  • Loading branch information
kyledurand authored Oct 31, 2024
1 parent 8f48aca commit 680d40c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
jobs:
check:
if: |
github.event.pull_request.user.login != 'dependabot[bot]' &&
!contains(github.event.pull_request.head.ref, 'changeset-release') &&
!contains(github.event.pull_request.labels.*.name, '🤖Skip Changelog')
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot Auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

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

- name: Approve and /shipit Dependabot PRs for patch and minor versions
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 680d40c

Please sign in to comment.