Skip to content
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

Add workflow for automating the license to comply with REUSE check #1522

Open
Tracked by #1456
juancho0202 opened this issue May 7, 2024 · 1 comment
Open
Tracked by #1456
Labels
github_actions Pull requests that update GitHub Actions code Kind: Enhancement New Request

Comments

@juancho0202
Copy link
Contributor

juancho0202 commented May 7, 2024

As a contributor to an LF Energy project I would like to improve my developer experience by having an automated workflow help me comply with the REUSE license check.

Acceptance Criteria:

  • Upon pull_request created a github workflow is triggered that:
    • Checks my branch for files that do not have license information (REUSE not compliant)
    • Adds a commit with license information

How license information should be added is described in the reuse website:

Comment headers

To implement this method, each plain text file that can contain comments MUST contain comments at the top of the file (comment header) that declare that file’s Copyright and Licensing Information.

If a file is not a plain text file or does not permit the inclusion of comments, the comment header that declares the file’s Copyright and Licensing Information SHOULD be in an adjacent file of the same name with the additional extension .license (example: cat.jpg.license if the original file is cat.jpg).

The comment header MUST contain one or more SPDX-FileCopyrightText tags, and one or more SPDX-License-Identifier tags. A tag is followed by a colon, followed by a text value, and terminated by a newline.

The SPDX-FileCopyrightText tag MUST be followed by a copyright notice.

Instead of the SPDX-FileCopyrightText tag, the symbol ©, or the word Copyright MAY be used, in which case a colon is not needed.

The SPDX-License-Identifier tag MUST be followed by a valid SPDX License Expression describing the licensing of the file (example: SPDX-License-Identifier: GPL-3.0-or-later OR Apache-2.0). If separate sections of the file are licensed differently, a different SPDX-License-Identifier tag MUST be included for each section.

An example of a comment header in a plain text file:

# SPDX-FileCopyrightText: 2016, 2018-2019 Jane Doe <[email protected]>
# SPDX-FileCopyrightText: 2019 Example Company
#
# SPDX-License-Identifier: GPL-3.0-or-later
@juancho0202 juancho0202 added Kind: Enhancement New Request github_actions Pull requests that update GitHub Actions code and removed Kind: Enhancement New Request labels May 7, 2024
@michelguerin michelguerin self-assigned this Nov 8, 2024
@michelguerin michelguerin added the Kind: Enhancement New Request label Nov 8, 2024
@michelguerin
Copy link

michelguerin commented Nov 8, 2024

Dependabot might be added to the project and help with license checks (like stated here)
@juancho0202, do you see a reason to use this tool in particular ?

@michelguerin michelguerin removed their assignment Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code Kind: Enhancement New Request
Projects
None yet
Development

No branches or pull requests

2 participants