mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-11-10 13:14:16 +00:00
Fix dependabot auto-merge
This commit is contained in:
parent
fd1b064c63
commit
39ec84a920
3 changed files with 36 additions and 28 deletions
36
.github/workflows/checks.yml
vendored
Normal file
36
.github/workflows/checks.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: CI
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
name: 'lint checks'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- name: 'Install dependencies'
|
||||
run: npm install
|
||||
- name: 'Run linter'
|
||||
run: npm run lint
|
||||
auto-merge:
|
||||
name: 'dependabot-auto-merge'
|
||||
needs: linter
|
||||
if: github.actor == 'dependabot[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: automerge
|
||||
uses: actions/github-script@0.2.0
|
||||
with:
|
||||
script: |
|
||||
github.pullRequests.createReview({
|
||||
owner: context.payload.repository.owner.login,
|
||||
repo: context.payload.repository.name,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
event: 'APPROVE'
|
||||
})
|
||||
github.pullRequests.merge({
|
||||
owner: context.payload.repository.owner.login,
|
||||
repo: context.payload.repository.name,
|
||||
pull_number: context.payload.pull_request.number
|
||||
})
|
||||
github-token: ${{github.token}}
|
14
.github/workflows/dependabot-auto-merge.yml
vendored
14
.github/workflows/dependabot-auto-merge.yml
vendored
|
@ -1,14 +0,0 @@
|
|||
name: auto-merge
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
auto-merge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ahmadnassri/action-dependabot-auto-merge@v2
|
||||
with:
|
||||
target: minor
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
14
.github/workflows/linter.yml
vendored
14
.github/workflows/linter.yml
vendored
|
@ -1,14 +0,0 @@
|
|||
name: 'Code validation'
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
name: 'Linter'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2.1.2
|
||||
- name: 'Install dependencies'
|
||||
run: npm install
|
||||
- name: 'Run linter'
|
||||
run: npm run lint
|
Loading…
Reference in a new issue