mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
7c58a38e88
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
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
/*
|
|
* Modules with checks are stored in ".gitlab/dangerjs/<module_name>". To import them, use path relative to "dangerfile.js"
|
|
*/
|
|
|
|
const checkMrCommits = require(`./mrCommitsCommitMessage.js`);
|
|
|
|
async function runChecks() {
|
|
// Checks for merge request title
|
|
require("./mrTitleNoDraftOrWip.js")();
|
|
|
|
// Checks for merge request description
|
|
require("./mrDescriptionLongEnough.js")();
|
|
require("./mrDescriptionHasReleaseNotes.js")();
|
|
await require('./mrDescriptionJiraLinks.js')();
|
|
|
|
// Checks for documentation
|
|
require("./mrDocsTranslation.js")();
|
|
|
|
// Checks for MR commits
|
|
require("./mrCommitsTooManyCommits.js")();
|
|
require("./mrCommitsCommitMessage.js")();
|
|
|
|
// Checks for MR code
|
|
require("./mrSizeTooLarge.js")();
|
|
|
|
// Add success log if no issues
|
|
if (
|
|
results.fails.length === 0 &&
|
|
results.warnings.length === 0 &&
|
|
results.messages.length === 0
|
|
) {
|
|
return message("Good Job! All checks are passing!");
|
|
}
|
|
}
|
|
|
|
runChecks();
|
|
|
|
// Add retry link
|
|
const retryLink = `${process.env.DANGER_GITLAB_HOST}/${process.env.CI_PROJECT_PATH}/-/jobs/${process.env.CI_JOB_ID}`;
|
|
markdown(
|
|
`***\n#### :repeat: You can enforce automatic MR checks by retrying the [DangerJS job](${retryLink})\n***`
|
|
);
|