Skip to content

Commit

Permalink
fix(ci): danger gives a false pass if the PR description is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
topocount committed Dec 16, 2024
1 parent 8f0b4f3 commit e724ac4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ function rules() {
);
} else {
// Remind people to add some details to the description, 200 accounts for roughly a sentence more than the standard template headers.
if (pr.body.includes('Thank you!') && pr.body.length < 200) {
if (
!pr.body ||
(pr.body.includes('Thank you!') && pr.body.length < 200)
) {
fail('Please add some non-placeholder details to the PR description.');
} else if (pr.body.length < 80) {
// if not using the template
Expand Down

0 comments on commit e724ac4

Please sign in to comment.