-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add legal boilerplate validation for external contributors #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: vaind <6349682+vaind@users.noreply.github.com>
Co-authored-by: vaind <6349682+vaind@users.noreply.github.com>
|
@copilot as usual, this needs tests... |
Co-authored-by: vaind <6349682+vaind@users.noreply.github.com>
Added comprehensive tests in commit 24ffc9f. The
All 15 new tests pass, and existing tests remain unaffected. |
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- Add legal boilerplate validation for external contributors ([#145](https://github.com/getsentry/github-workflows/pull/145))If none of the above apply, you can opt out of this check by adding |
External contributors using
gh pr create --bodyor similar tools bypass PR templates, potentially missing required legal notices in FSL-licensed repositories.Implementation
.github/PULL_REQUEST_TEMPLATE.md, etc.)/^#{1,6}\s+Legal\s+Boilerplate/im)Behavior
The check runs in
checkLegalBoilerplate()as part of the Danger workflow:Zero overhead for org members and repos without legal boilerplate sections in their templates.
Testing
Added comprehensive test suite with 15 test cases for the
extractLegalBoilerplateSectionfunction:The
extractLegalBoilerplateSectionfunction is exported fromdangerfile-utils.jsfor testability, following the existing pattern in the codebase.All existing tests pass (20/20), and all new tests pass (15/15).
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.