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 template workflow to check the license file #21

Merged
merged 1 commit into from
Jun 16, 2021
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 15, 2021

Whenever one of the recognized license file names are modified in the repository, the workflow runs licensee to check whether the license can be recognized and whether it is of the expected type.

GitHub has a useful automated license detection system that determines the license type used by a repository, and surfaces that information in the repository home page, the search web interface, and the GitHub API. This license detection system requires that the license be defined by a dedicated file with one of several standardized filenames and paths.

GitHub's license detection system uses the popular licensee tool, so this file also serves to define the license type for any other usages of licensee, as well as to human readers of the file.

For this reason, and to ensure it remains a valid legal instrument, it's important that there be no non-standard modifications to the license file or collisions with other supported licence files. This workflow ensures that any changes which would change the license type or which license file is used by the detection are caught automatically.

Notes

  • I chose not to take the usual task-based approach for this one because I think the value of that comes from facilitating running common development processes locally. But I don't think this is common, nor something anyone would bother running. Instead, it's something that can be added to the repository and forgotten until the day comes that someone mucks around with the license file.
  • Although this workflow is in use in this repo, it is not possible to set up a sync because the CI workflow was modified from the template to use the CC0 license.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 15, 2021
@per1234 per1234 requested review from silvanocerza and rsora June 15, 2021 20:55
Whenever one of the recognized license file names are modified in the repository, the workflow runs to check whether the
license can be recognized and whether it is of the expected type.

GitHub has a useful automated license detection system that determines the license type used by a repository, and
surfaces that information in the repository home page, the search web interface, and the GitHub API. This license
detection system requires that the license be defined by a dedicated file with one of several standardized filenames and
paths.

GitHub's license detection system uses the popular licensee tool, so this file also serves to define the license type
for any other usages of licensee, as well as to human readers of the file.

For this reason, and to ensure it remains a valid legal instrument, it's important that there be no non-standard
modifications to the license file or collisions with other supported licence files. This workflow ensures that any
changes which would change the license type or which license file is used by the detection are caught automatically.
@per1234 per1234 merged commit fb49847 into main Jun 16, 2021
@per1234 per1234 deleted the check-license branch June 16, 2021 08:54
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants