From 22e782faae246238451056c84a522038cdaeab37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= Date: Wed, 24 Sep 2025 12:49:30 +0200 Subject: [PATCH] githooks: add docs prefix In the process, update the README to point to how to add the githooks folder. I had to go to aports to find the command. Part-of: --- .githooks/prepare-commit-msg | 6 ++++++ README.md | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index c8ab2e022..db3f57258 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -49,6 +49,12 @@ case "$lcp" in device/*/*) prefix="$(echo "$lcp" | cut -d/ -f3)" ;; + docs/*.adoc) + prefix="docs/$(basename $lcp .adoc)" + ;; + docs/*) + prefix="docs" + ;; device/*) # Multiple packages touched for same device category. More # logic could be added to detect if they all belong to same diff --git a/README.md b/README.md index 2f37d4ce5..25251b45d 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,12 @@ Helpful resources: * [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/) * [Alpine Linux package search](https://pkgs.alpinelinux.org/packages) * [postmarketOS package search](https://pkgs.postmarketos.org/packages) + +## Git Hooks + +You can find some useful git hooks in the `.githooks` directory. +To use them, run the following command after cloning this repository: + +```sh +git config --local core.hooksPath .githooks +```