esp-idf/.gitlab/dangerjs/mrSizeTooLarge.js
Tomas Sebestik 7c58a38e88 Add improved check for Jira links
Break DangerJS checks to modules
Improove "Release notes" section detection
Change check for size MR to async/await syntax
Update check for MR title - exact match WIP and DRAFT
Add check for incorrect format closing Jira link
Update check WIP in MR title
2023-03-06 13:43:25 +01:00

16 lines
455 B
JavaScript

/**
* Check if MR is too large (more than 1000 lines of changes)
*
* @dangerjs INFO
*/
module.exports = async function () {
const bigMrLinesOfCodeThreshold = 1000;
const totalLines = await danger.git.linesOfCode();
if (totalLines > bigMrLinesOfCodeThreshold) {
return message(
`This MR seems to be quite large (total lines of code: ${totalLines}), you might consider splitting it into smaller MRs`
);
}
};