Skip to content

Commit

Permalink
chore(prlint): exclude package cfnspec from expecting changes to READ…
Browse files Browse the repository at this point in the history
…ME (aws#6600)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] authored Mar 5, 2020
1 parent a0fb518 commit dfdbfc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/prlint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ function createGitHubClient() {
return new GitHub({'token': token});
}

function isPkgCfnspec(issue) {
return issue.title.indexOf("(cfnspec)") > -1;
}

function isFeature(issue) {
return issue.title.startsWith("feat")
}
Expand All @@ -39,7 +43,7 @@ function readmeChanged(files) {
}

function featureContainsReadme(issue, files) {
if (isFeature(issue) && !readmeChanged(files)) {
if (isFeature(issue) && !readmeChanged(files) && !isPkgCfnspec(issue)) {
throw new LinterError("Features must contain a change to a README file");
};
};
Expand Down

0 comments on commit dfdbfc6

Please sign in to comment.