Skip to content

Commit

Permalink
use Dependabot v2 (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktr0731 authored Mar 18, 2021
1 parent e630563 commit 3111fb5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .dependabot/config.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- update
reviewers:
- ktr0731
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
labels:
- update
reviewers:
- ktr0731
25 changes: 25 additions & 0 deletions .github/workflows/approve_and_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Auto approve and merge Pull Requests"
on:
pull_request_target
jobs:
worker:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Auto approve and merge Pull Request
uses: actions/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
event: "APPROVE"
})
await github.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
merge_method: "squash"
})

0 comments on commit 3111fb5

Please sign in to comment.