open-scd icon indicating copy to clipboard operation
open-scd copied to clipboard

Add workflow for automating the license to comply with REUSE check

Open juancho0202 opened this issue 9 months ago • 0 comments

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 avatar May 07 '24 14:05 juancho0202