diff --git a/CHANGELOG.md b/CHANGELOG.md index 4615133..81e0c34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.13.0 + +### Features + +- Danger - Changelog checks can now additionally be skipped with a `skip-changelog` label ([#94](https://github.com/getsentry/github-workflows/pull/94)) + ## 2.12.0 ### Features diff --git a/danger/dangerfile.js b/danger/dangerfile.js index 17a4b70..6855f24 100644 --- a/danger/dangerfile.js +++ b/danger/dangerfile.js @@ -69,7 +69,8 @@ async function checkChangelog() { // Check if skipped if ( ["ci", "test", "deps", "chore(deps)", "build(deps)"].includes(prFlavor) || - (danger.github.pr.body + "").includes("#skip-changelog") + (danger.github.pr.body + "").includes("#skip-changelog") || + (danger.github.pr.labels || []).some(label => label.name === 'skip-changelog') ) { return; } @@ -126,7 +127,7 @@ Example: - ${prTitleFormatted} ([#${danger.github.pr.number}](${danger.github.pr.html_url})) \`\`\` -If none of the above apply, you can opt out of this check by adding \`#skip-changelog\` to the PR description.`.trim(), +If none of the above apply, you can opt out of this check by adding \`#skip-changelog\` to the PR description or adding a \`skip-changelog\` label.`.trim(), changelogFile ); }