mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-21 02:40:08 +00:00
ci: add danger
This commit is contained in:
13
.github/workflows/danger.yml
vendored
Normal file
13
.github/workflows/danger.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Node CI
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: danger/danger-js@11
|
||||
with:
|
||||
args: --text-only
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
11
dangerfile.ts
Normal file
11
dangerfile.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { danger, message } from 'danger'
|
||||
|
||||
const commitType = ['build', 'chore', 'ci', 'docs', 'style', 'refactor', 'perf', 'test']
|
||||
|
||||
if (!commitType.find((type) => danger.github.pr.title.startsWith(type))) {
|
||||
message(`This pull request title should start with either ${commitType.join(', ')}.`)
|
||||
}
|
||||
|
||||
if (!danger.github.pr.assignee) {
|
||||
message('This pull request needs an assignee.')
|
||||
}
|
||||
@@ -29,6 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"chokidar-cli": "^3.0.0",
|
||||
"danger": "^11.3.1",
|
||||
"eslint": "^8.54.0",
|
||||
"eslint-config-discordeno": "*",
|
||||
"husky": "^8.0.3",
|
||||
|
||||
Reference in New Issue
Block a user