Repository navigation
Make CONTRIBUTORS.txt optional in license headers #268
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Shell Tests | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| license-header-check: | ||
| name: License header check tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Test license header check | ||
| run: bash tests/check-license-header.sh |
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,58 @@ | ||
| #!/bin/bash | ||
| ##===----------------------------------------------------------------------===## | ||
| ## | ||
| ## This source file is part of the Swift.org open source project | ||
| ## | ||
| ## Copyright (c) 2026 Apple Inc. and the Swift project authors | ||
| ## Licensed under Apache License v2.0 with Runtime Library Exception | ||
| ## | ||
| ## See https://swift.org/LICENSE.txt for license information | ||
| ## | ||
| ##===----------------------------------------------------------------------===## | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) | ||
| tmpdir=$(mktemp -d) | ||
| trap 'rm -rf "${tmpdir}"' EXIT | ||
|
|
||
| mkdir -p "${tmpdir}/.github/workflows/scripts" | ||
| cp "${repo_root}/.github/workflows/scripts/check-license-header.sh" "${tmpdir}/.github/workflows/scripts/check-license-header.sh" | ||
|
|
||
| cd "${tmpdir}" | ||
| git init -q | ||
|
|
||
| cat > WithContributors.swift <<'EOF' | ||
| //===----------------------------------------------------------------------===// | ||
| // | ||
| // This source file is part of the Swift Logging API open source project | ||
| // | ||
| // Copyright (c) 2025 Apple Inc. and the Swift Logging API project authors | ||
| // Licensed under Apache License v2.0 | ||
| // | ||
| // See LICENSE.txt for license information | ||
| // See CONTRIBUTORS.txt for the list of Swift Logging API project authors | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| EOF | ||
|
|
||
| cat > WithoutContributors.swift <<'EOF' | ||
| //===----------------------------------------------------------------------===// | ||
| // | ||
| // This source file is part of the Swift Logging API open source project | ||
| // | ||
| // Copyright (c) 2025 Apple Inc. and the Swift Logging API project authors | ||
| // Licensed under Apache License v2.0 | ||
| // | ||
| // See LICENSE.txt for license information | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| EOF | ||
|
|
||
| git add WithContributors.swift WithoutContributors.swift | ||
|
|
||
| PROJECT_NAME="Swift Logging API" .github/workflows/scripts/check-license-header.sh |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we configure the pull request CI to run these shell tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FranzBusch I have added a
shell_testsjob, based on the similar template as other CI jobs in this repo.