Skip to content

Commit

Permalink
chore: add danger
Browse files Browse the repository at this point in the history
  • Loading branch information
aussedatlo committed Feb 13, 2024
1 parent 7206715 commit 54b520c
Show file tree
Hide file tree
Showing 4 changed files with 798 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: pull_request
on: [pull_request]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Workaround when using custom runners
# https://github.com/danger/danger-js/issues/1374
DANGER_GITHUB_API_BASE_URL: "https://api.github.com"
CI_JOB_NUMBER: 1
FORCE_COLOR: 1

Expand All @@ -22,3 +26,6 @@ jobs:

- name: Test
run: pnpm test

- name: Danger
run: pnpm danger ci -v
7 changes: 7 additions & 0 deletions dangerfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { danger, fail } from "danger";

if (danger.github.pr.assignee === null) {
fail(
"Please assign someone to merge this PR, and optionally include people who should review."
);
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"danger": "^11.3.1",
"eslint": "^8.56.0",
"husky": "^9.0.10",
"hygen": "^6.2.11",
Expand Down
Loading

0 comments on commit 54b520c

Please sign in to comment.