Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dependabot automerge #40

Merged
merged 2 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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