You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify checkLegalBoilerplate and remove unnecessary indirection
Extract findPRTemplate helper and named constants (INTERNAL_ASSOCIATIONS,
PR_TEMPLATE_PATHS). Simplify extractLegalBoilerplateSection using findIndex.
Inline checkLegalBoilerplate call in checkAll, removing the wrapper function.
Derive test LEGAL_TEXT from the template constant to prevent drift.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
// Check if PR body contains the legal boilerplate section
183
147
if(!actualBoilerplate){
184
148
fail('This PR is missing the required legal boilerplate. As an external contributor, please include the "Legal Boilerplate" section from the PR template in your PR description.');
185
149
@@ -199,13 +163,10 @@ This is required to ensure proper intellectual property rights for your contribu
199
163
return;
200
164
}
201
165
202
-
// Verify the actual boilerplate matches the expected one
203
-
// Normalize whitespace for comparison
166
+
// Normalize whitespace so minor formatting differences don't cause false negatives
fail('The legal boilerplate in your PR description does not match the template. Please ensure you include the complete, unmodified legal text from the PR template.');
210
171
211
172
markdown(`
@@ -227,6 +188,18 @@ This is required to ensure proper intellectual property rights for your contribu
Copy file name to clipboardExpand all lines: danger/dangerfile-utils.test.js
+3-7Lines changed: 3 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -536,13 +536,10 @@ Look, I get it. The entity doing business as "Sentry" was incorporated in the St
536
536
## Checklist
537
537
- [ ] Tests added`;
538
538
539
-
constLEGAL_TEXT='Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here\'s the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry\'s choice of terms.';
539
+
// Derived from the template to stay in sync automatically
0 commit comments