Git Hooks and Github actions - wb8tyw/D-Rats GitHub Wiki

Git hooks are scripts that are run based on various git actions.

A git hook is being setup that will run a number of checks before allowing the commit to be created.

D-rats developers should start using the pre-commit hook file when it becomes avaialble.

A githook has to be installed by the end user manually.

For d-rats that is done by cp tests/pre-comit .git/pre-commit. You must make sure that the .git/pre-commit has read and execute access.

Planned checks are:

  • Pylint Python style and syntax check
  • Spelling Spellchecking of code and message catalog sources
  • Shellcheck Shell style and syntax check
  • xmllint XML syntax check
  • yamllint Yaml syntax check if YAML files are found in the repository.

Github actions are tasks that can be triggered by actions on the Github repository.

The github actions are planned to be run on Pull Requests being created or updated.

At a minimum the github actions will run the same checks as the git hook, and Pull Requests that do not pass are not likely to be accepted.