From e724ac4213f112c2aa665c48c11e6c2b964a6056 Mon Sep 17 00:00:00 2001 From: Kevin Siegler <17910833+topocount@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:30:56 -0600 Subject: [PATCH] fix(ci): danger gives a false pass if the PR description is empty --- dangerfile.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dangerfile.ts b/dangerfile.ts index 8be7932b1..fb2f75e64 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -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