# .pre-commit-config.yaml の例（Python プロジェクト向け）
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.6.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-json
      - id: check-merge-conflict
  - repo: https://github.com/psf/black
    rev: 24.4.2
    hooks:
      - id: black
        language_version: python3
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.4.4
    hooks:
      - id: ruff
        args: [--fix]
  - repo: local
    hooks:
      - id: check-ticket-number
        name: Check ticket number in commit message
        entry: bash -c 'grep -qE "[A-Z]+-[0-9]+" "$1"' --
        language: system
        stages: [commit-msg]