Skip to content

Commit

Permalink
fix: dependabot automerge (#40)
Browse files Browse the repository at this point in the history
* fix: dependabot config

* fix: lint
  • Loading branch information
salmanm authored Nov 6, 2020
1 parent 0a13523 commit 1fc4e29
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 48 deletions.
12 changes: 5 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "dependabot"
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
28 changes: 0 additions & 28 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

44 changes: 33 additions & 11 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,39 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: |
npm install
- name: Install
run: |
npm install
- name: Test
run: |
npm test
- name: Test
run: |
npm test
automerge:
needs: test
runs-on: ubuntu-latest
steps:
- name: Dependabot Auto Merge
uses: actions/github-script@v3
if: ${{ github.actor == 'dependabot[bot]' }}
with:
github-token: ${{secrets.github_token}}
script: |
github.pulls.createReview({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
})
github.pulls.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
4 changes: 2 additions & 2 deletions lib/vary.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const append = require('vary').append
// Same implementation of https://github.com/jshttp/vary
// but adapted to the Fastify API
function vary (field) {
var value = this.getHeader('Vary') || ''
var header = Array.isArray(value)
let value = this.getHeader('Vary') || ''
const header = Array.isArray(value)
? value.join(', ')
: String(value)

Expand Down

0 comments on commit 1fc4e29

Please sign in to comment.