Skip to content

Commit 24ddc1b

Browse files
committed
chore: move danger to GH action
also convert dangerfile to typescript
1 parent 6de136a commit 24ddc1b

File tree

8 files changed

+478
-75
lines changed

8 files changed

+478
-75
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
globals,
6464
},
6565
{
66-
files: 'src/**/*',
66+
files: ['src/**/*', 'dangerfile.ts'],
6767
parserOptions: {
6868
sourceType: 'module',
6969
},

.github/workflows/commitlint.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
on: [pull_request]
3+
4+
jobs:
5+
commitlint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- uses: wagoid/[email protected]
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
danger:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v1
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: 12.x
19+
- name: install
20+
run: yarn
21+
- name: Danger
22+
run: yarn danger ci
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/nodejs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ jobs:
5050

5151
steps:
5252
- uses: actions/checkout@v1
53-
- name: Use Node.js ${{ matrix.node-version }}
54-
uses: actions/setup-node@v1
53+
- uses: actions/setup-node@v1
5554
with:
5655
node-version: 12.x
5756
- name: install

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ before_script: greenkeeper-lockfile-update
1212
script:
1313
- yarn test --coverage --maxWorkers 2
1414
after_script: greenkeeper-lockfile-upload
15-
jobs:
16-
include:
17-
- stage: danger
18-
node_js: lts/*
19-
os: linux
20-
script:
21-
- npx -p danger@^3 danger ci
2215
cache:
2316
yarn: true
2417
branches:

dangerfile.js renamed to dangerfile.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
'use strict';
2-
3-
// eslint-disable-next-line node/no-missing-require
4-
const { danger, fail } = require('danger');
1+
import { danger } from 'danger';
52

63
// Ensure that people include a description on their PRs
74
if (danger.github.pr.body.length === 0) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@typescript-eslint/parser": "^2.5.0",
5555
"babel-jest": "^24.9.0",
5656
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
57+
"danger": "^9.2.2",
5758
"eslint": "^5.1.0 || ^6.0.0",
5859
"eslint-config-prettier": "^6.5.0",
5960
"eslint-plugin-eslint-plugin": "^2.0.0",

0 commit comments

Comments
 (0)