-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ci: add third-party license notices #2268
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
Open
Tantanz20020918
wants to merge
19
commits into
main
Choose a base branch
from
ci/third-party-notices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f456f55
feat: generate third-party notices
Tantanz20020918 1b8eba0
ci: require notices with dependency changes
Tantanz20020918 42712c2
ci: include notices in release packages
Tantanz20020918 192540e
ci: gate releases on third-party notices
Tantanz20020918 70430e1
fix: validate declared dependency licenses
Tantanz20020918 c1f7d28
fix: isolate Go dependency scanning
Tantanz20020918 573f1af
fix: fail closed when Go sources are unavailable
Tantanz20020918 e13418d
test: run third-party notice checks in CI
Tantanz20020918 6888bc4
fix: tighten third-party notice validation
Tantanz20020918 53651d4
test: simplify notice test imports
Tantanz20020918 e2cfc8c
fix: scan Node dependencies for release targets
Tantanz20020918 e2fd384
refactor: simplify third-party notice checks
Tantanz20020918 bc44818
refactor: avoid duplicate preview notice checks
Tantanz20020918 0ce1e44
fix: clarify license review guidance
Tantanz20020918 141d09a
fix: match complete license templates
Tantanz20020918 98cdcd6
fix: warn on additional license restrictions
Tantanz20020918 bb07fa2
test: verify stale notices CI failure
Tantanz20020918 20ee450
Revert "test: verify stale notices CI failure"
Tantanz20020918 4fe1315
ci: bound security checks runtime
Tantanz20020918 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright (c) 2026 Lark Technologies Pte. Ltd. | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| staged_files="$(git diff --cached --name-only --diff-filter=ACMR)" | ||
| go_dependency_change='^[+-][[:space:]]*(require|replace|exclude)[[:space:]]|^[+-][[:space:]]+[^[:space:]]+[[:space:]]+v[0-9]' | ||
| if git diff --cached --unified=0 -- go.mod | grep -Eq "$go_dependency_change"; then | ||
| dependency_change=1 | ||
| else | ||
| package_dependency_change="$(node -e ' | ||
| const dependencies = value => ({ | ||
| dependencies: value.dependencies ?? {}, | ||
| optionalDependencies: value.optionalDependencies ?? {}, | ||
| }); | ||
| const [before, after] = process.argv.slice(1).map(JSON.parse); | ||
| process.stdout.write(JSON.stringify(dependencies(before)) === JSON.stringify(dependencies(after)) ? "0" : "1"); | ||
| ' "$(git show HEAD:package.json 2>/dev/null || printf '{}')" "$(git show :package.json 2>/dev/null || printf '{}')")" | ||
| dependency_change="$package_dependency_change" | ||
| fi | ||
|
|
||
| if [ "$dependency_change" = 1 ] \ | ||
| && ! printf '%s\n' "$staged_files" | grep -Fxq 'THIRD_PARTY_NOTICES.md'; then | ||
| echo "Dependency metadata changed. Run 'make third-party-notices', review it, and stage THIRD_PARTY_NOTICES.md." >&2 | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.