Skip to content

dngtableau/validate-python-headers

 
 

Repository files navigation

Header validator for your Python files

CI Status black bandit

GitHub release (latest by date) GitHub

This action checks the copyright and license notices in the headers of your Python files.

Inputs

owner

Required The copyright owner.

starting-year

Required The starting year of your project.

license

Identifier of the license for your project (cf. SPDX identifiers). Default null.

folders

The folders to inspect, separated by a comma. Default ".".

ignore-files

The files to ignore, separated by a comma. Default "__init__.py".

ignore-folders

The folders to ignore, separated by a comma. Default ".github/".

license-notice

The path to a license notice text. If license is null, the header will be expected to have this text as a license notice. Default null.

Outputs

The list of files with header issues.

Example usages

Using an Open-source license:

uses: frgfm/validate-python-headers@main
with:
  license: 'Apache-2.0'
  owner: 'François-Guillaume Fernandez'
  starting-year: 2022
  ignore-files: 'version.py,__init__.py'
  ignore-folders: '.github/'

On closed source code:

uses: frgfm/validate-python-headers@main
with:
  license-notice: '.github/license-notice.txt'
  owner: 'François-Guillaume Fernandez'
  starting-year: 2022
  ignore-files: 'version.py,__init__.py'
  ignore-folders: '.github/'

Contributing

Any sort of contribution is greatly appreciated!

You can find a short guide in CONTRIBUTING to help grow this project!

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

About

An action to validate the headers of your Python files

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.2%
  • Makefile 10.0%
  • Dockerfile 4.1%
  • Shell 2.7%