Skip to content

Commit

Permalink
Merge pull request #408 from betadots/dep-auto-merge
Browse files Browse the repository at this point in the history
Switch PRs from dependabot to automerge if tests pass
  • Loading branch information
rwaffen authored Jul 17, 2024
2 parents 0bc4daa + b782857 commit e7f57a6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,22 @@ jobs:
name: Test suite
steps:
- run: echo Test suite completed

dependabot:
name: 'Dependabot auto-merge'
needs:
- tests
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
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}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
require_relative "support/fake_puppet_db"
require_relative "support/openapi"
require_relative "support/sign_in_helper"
require 'rackup'

# Start FakePuppetDB-Server
server_thread = Thread.new do
Expand Down

0 comments on commit e7f57a6

Please sign in to comment.