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
Copy file name to clipboardExpand all lines: danger/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ The Danger action runs the following checks:
61
61
- **Action pinning**: Verifies GitHub Actions are pinned to specific commits for security
62
62
- **Conventional commits**: Validates commit message format and PR title conventions
63
63
- **Cross-repo links**: Checks for proper formatting of links in changelog entries
64
+
- **Legal boilerplate validation**: For external contributors (non-organization members), verifies the presence of required legal notices in PR descriptions when the repository's PR template includes a "Legal Boilerplate" section
64
65
65
66
For detailed rule implementations, see [dangerfile.js](dangerfile.js).
// Check if the PR description contains the legal boilerplate
262
+
constprBody=danger.github.pr.body||'';
263
+
264
+
// Look for the legal boilerplate header in the PR description
265
+
if(!legalBoilerplateHeaderRegex.test(prBody)){
266
+
fail(
267
+
'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.',
268
+
undefined,
269
+
undefined
270
+
);
271
+
272
+
markdown(`
273
+
### ⚖️ Legal Boilerplate Required
274
+
275
+
As an external contributor, your PR must include the legal boilerplate from the PR template.
276
+
277
+
Please add the following section to your PR description:
0 commit comments