-
Notifications
You must be signed in to change notification settings - Fork 0
Git(Hub)
Allex edited this page Oct 27, 2025
·
4 revisions
https://dhwthompson.com/2019/my-favourite-git-commit
.pre-commit-config.yaml useful for most repos I work on:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: mixed-line-ending
args: [ --fix=lf ]
- id: no-commit-to-branch
name: Don't commit to the default branch
args: [ --branch, main ]
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
# Check GitHub workflow files
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint
# Check Renovate config changes
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 40.50.0
hooks:
- id: renovate-config-validator- https://github.com/changesets/action
- https://github.com/googleapis/release-please
- https://towncrier.readthedocs.io/en/stable/tutorial.html
# Helper to output github log grouping when run in a github workflow
_group name:
@echo "{{ if env_var_or_default("GITHUB_WORKFLOW", "") != "" { "::group::"+name } else { "" } }}"
_endgroup:
@echo "{{ if env_var_or_default("GITHUB_WORKFLOW", "") != "" { "::endgroup::" } else { "" } }}"
virtualenv: (_group "virtualenv") && _endgroup
poetry sync