Bump eslint from 9.14.0 to 9.15.0 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependabot Auto Merge | |
on: | |
pull_request: | |
types: | |
- synchronize | |
- reopened | |
- opened | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest | |
if: github.actor == 'dependabot[bot]' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
run: npm test | |
- name: Debug Environment Variables | |
run: env | |
- name: Merge Dependabot PR | |
if: success() | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const { context, github } = require('@actions/github'); | |
const pr = context.payload.pull_request; | |
if (pr.user.login === 'dependabot[bot]' && pr.mergeable_state === 'clean') { | |
await github.pulls.merge({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: pr.number, | |
merge_method: 'squash' | |
}); | |
} else { | |
console.log(`PR not mergeable or not from dependabot: user=${pr.user.login}, mergeable_state=${pr.mergeable_state}`); | |
} |