Danger JS setup used for GitLab merge requests by Good Praxis. The main goal is to address issues that are not covered in build, test and lint phases.
- Checks if someone is assigned to MR
- Checks if MR is too big
- Encourages users to push one commit per MR
- Checks if MR has description
- Checks whether commits in MR look correct
- Checks
package.json
changes - Checks which font files are added
- Checks if SVG files contain unnecessary data
- Checks if SVG files accidentally embed bitmaps
- Encourages users to optimize images
Make sure you have read and followed the steps described at the Getting Started section of the Danger documentation.
Install the package:
npm install @goodpraxis/danger-js --save-dev
Create a dangerfile.ts
with the following contents:
import checkMergeRequest from '@goodpraxis/danger-js';
checkMergeRequest();
- Moved typescript from devDependencies to dependencies
- Ability to suppress image warning by writing "optimized images" or similar in merge request description (see regex)
- Commit number check
- SVG file checks
- Font file checks
package.json
check- Detecting new images
- Copy has been updated
- Updated dependencies
- Fixed typo
- Type declarations
- Commit message checks
- Compilation target now set to
es6
- Reduced big MR threshold from 20 to 10
- First version with initial checks