Skip to content

Commit

Permalink
Merge pull request #2130 from VWS-Python/dependabot-automerge
Browse files Browse the repository at this point in the history
Automatically merge dependabot PRs once status checks pass
  • Loading branch information
adamtheturtle authored Feb 22, 2024
2 parents db398ba + 9b5bcc3 commit a36042f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
# See
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches
token: ${{ secrets.RELEASE_PAT }}

- name: "Set up Python"
uses: actions/setup-python@v5
Expand Down

0 comments on commit a36042f

Please sign in to comment.