Skip to content

Git(Hub)

Allex edited this page Oct 27, 2025 · 4 revisions

Best commit message

https://dhwthompson.com/2019/my-favourite-git-commit

pre-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

Release PR automation tools

Add GitHub Actions log groups to justfile

# 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
image

Clone this wiki locally