Add Danger.js

This commit is contained in:
Michael Teeuw 2018-01-25 16:24:05 +01:00
parent fbcb7ae836
commit bad6575d83
6 changed files with 5089 additions and 128 deletions

View File

@ -2,6 +2,7 @@ language: node_js
node_js: node_js:
- "7" - "7"
before_script: before_script:
- yarn danger ci
- npm install grunt-cli -g - npm install grunt-cli -g
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"

View File

@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add system notification `MODULE_DOM_CREATED` for notifying each module when their Dom has been fully loaded. - Add system notification `MODULE_DOM_CREATED` for notifying each module when their Dom has been fully loaded.
- Add types for module. - Add types for module.
- Implement Danger.js to notify contributors when CHANGELOG.md is missing in PR.
### Fixed ### Fixed
- News article in fullscreen (iframe) is now shown in front of modules. - News article in fullscreen (iframe) is now shown in front of modules.

9
dangerfile.js Normal file
View File

@ -0,0 +1,9 @@
import { message, danger } from "danger"
// Add a CHANGELOG entry for app changes
const hasChangelog = includes(danger.git.modified_files, "CHANGELOG.md")
const isTrivial = contains((danger.github.pr.body + danger.github.pr.title), "#trivial")
if (!hasChangelog && !isTrivial) {
warn("Please add a `CHANGELOG.md` entry for your changes.")
}

814
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -36,6 +36,7 @@
"chai": "^4.1.2", "chai": "^4.1.2",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"current-week-number": "^1.0.7", "current-week-number": "^1.0.7",
"danger": "^3.1.3",
"grunt": "latest", "grunt": "latest",
"grunt-eslint": "latest", "grunt-eslint": "latest",
"grunt-jsonlint": "latest", "grunt-jsonlint": "latest",

4391
yarn.lock Normal file

File diff suppressed because it is too large Load Diff