From 5562f3ccc36ff4032331dd02d62cf9c0d27730bc Mon Sep 17 00:00:00 2001 From: Richard Lin Date: Sun, 19 Jul 2026 00:29:24 -0700 Subject: [PATCH 1/2] New PR template and text --- .github/pull_request_template.md | 13 +++++++++++++ CONTRIBUTING.md | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..377d6231d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ + + + + +--- + +### Contributor License Agreement + + + +By submitting this pull request, I agree to dual-license this contribution under both BSD 3-clause and Apache License, Version 2.0. + +- [ ] **I agree to dual-license this contribution under both BSD 3-clause and Apache License, Version 2.0.** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae7308cf1..05add6fd2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,16 @@ We take pull requests! All pull requests are thoroughly reviewed for code quality. +## Licensing + +The "outbound" license of this repository as a whole remains BSD 3-clause, as was set up at repository creation. +New code ("inbound") is required to be dual-licensed under both BSD 3-clause and Apache License, Version 2.0. +This requirement is so new contributions can be used with a more modern license without messy relicensing of older code. + +By contributing to this project, you agree to dual-license your contributions under both BSD 3-clause and Apache License, Version 2.0. +The pull request template includes text to confirm this. + + ## Parts Contributions This repository maintains a curated parts library since: From 00f4bf2ea9dd1a70ca7ffddb967fbbd7d483caf3 Mon Sep 17 00:00:00 2001 From: Richard Lin Date: Sun, 19 Jul 2026 00:34:47 -0700 Subject: [PATCH 2/2] Create pr-license.yml --- .github/workflows/pr-license.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pr-license.yml diff --git a/.github/workflows/pr-license.yml b/.github/workflows/pr-license.yml new file mode 100644 index 000000000..b2487db26 --- /dev/null +++ b/.github/workflows/pr-license.yml @@ -0,0 +1,24 @@ +name: CLA Check + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +permissions: + pull-requests: read + +jobs: + enforce-cla: + runs-on: ubuntu-latest + steps: + - name: Dual-License Agreement + env: + PR_BODY: ${{ github.event.pull_request.body }} + run: | + # Use a regex match to look for the exact checked markdown box + if echo "$PR_BODY" | grep -qE '\-\s*\[x\]\s*\*?\*?I agree to dual\-license this contribution under both BSD 3\-clause and Apache License, Version 2\.0\.'; then + echo "CLA OK" + else + echo "You must check the dual-licensing agreement box in the PR description to pass this check." + exit 1 + fi