Skip to content

Commit

Permalink
Revert "ci(danger): Allow skip-changelog markers in some comments (#714
Browse files Browse the repository at this point in the history
…)"

This reverts commit b8bd1ea.
  • Loading branch information
flub authored Apr 11, 2022
1 parent b8bd1ea commit d10f9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
pull_request:
types: [opened, synchronize, reopened, edited, ready_for_review]

permissions:
pull-requests: write

jobs:
build:
name: Changelogs
Expand Down
23 changes: 4 additions & 19 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,11 @@ async function containsChangelog(path) {
return contents.includes(PR_LINK);
}

function skipChangelog() {
if (!danger.github) {
return false;
}
if ((danger.github.pr.body + "").includes("#skip-changelog")) {
// The PR description can always contain skip-changelog
return true;
}
for (let comment of danger.github.api.getPullRequestComments) {
// If a comment in a command to dependabot we also accept a #skip-changelog marker there
if (comment.body.includes("@dependabot")
&& comment.body.includes("#skip-changelog")) {
return true;
}
}
return false;
}

async function checkChangelog() {
if (skipChangelog()) {
const skipChangelog =
danger.github && (danger.github.pr.body + "").includes("#skip-changelog");

if (skipChangelog) {
return;
}

Expand Down

0 comments on commit d10f9a8

Please sign in to comment.