Skip to content

GH-119: Makefile-based git hooks setup#122

Merged
ppaulweber merged 1 commit intomasterfrom
task/GH-119_automatic-git-hooks-registry
Feb 21, 2026
Merged

GH-119: Makefile-based git hooks setup#122
ppaulweber merged 1 commit intomasterfrom
task/GH-119_automatic-git-hooks-registry

Conversation

@ppaulweber
Copy link
Copy Markdown
Contributor

This PR introduces the following changes:

Copilot AI review requested due to automatic review settings February 21, 2026 10:55
@ppaulweber ppaulweber self-assigned this Feb 21, 2026
@github-actions
Copy link
Copy Markdown

🤖 Validation Passed

@ppaulweber ppaulweber merged commit 40abe1e into master Feb 21, 2026
6 checks passed
@ppaulweber ppaulweber deleted the task/GH-119_automatic-git-hooks-registry branch February 21, 2026 10:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Makefile-driven setup flow for local git hooks and introduces a pre-push hook under .github/hooks, alongside helper Makefile targets for building/debugging the GitHub Pages site.

Changes:

  • Adds a check-hooks Makefile target and wires it into the default Makefile flow.
  • Introduces .github/hooks/pre-push to enforce a branch naming convention before pushing.
  • Adds Makefile targets to build/serve the Zola-based GitHub Pages site via Docker.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
Makefile Adds default hook setup, Zola docker helpers, and a check-hooks target that sets core.hooksPath.
.github/hooks/pre-push Adds a pre-push branch-name validation hook.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +57 to +62
check-hooks:
ifeq (${VERBOSE},1)
@echo "⚙️ Configuring local git hooks..."
endif
@git config core.hooksPath $(HOOKS_PATH)
@chmod +x $(HOOKS_PATH)/*
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check-hooks target mutates the repo’s git configuration (core.hooksPath) as part of the default build path. This can unexpectedly change contributors’ local .git/config just by running make. Consider making hook configuration an explicit opt-in target (e.g., setup-hooks) or gating it behind an environment flag, and keep default focused on build/test operations.

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +51
docker run -v `pwd`:/tmp -p 1111:1111 -w /tmp ghcr.io/getzola/zola:v0.18.0 -r .github/pages build

github-pages-debug:
docker run -v `pwd`:/tmp -p 1111:1111 -w /tmp ghcr.io/getzola/zola:v0.18.0 -r .github/pages serve -i 0.0.0.0
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker run -v pwd:/tmp volume argument is unquoted, so paths containing spaces will break. Consider using $(PWD) (or $(shell pwd)) with quoting for the bind mount, and adding --rm to avoid leaving stopped containers behind.

Suggested change
docker run -v `pwd`:/tmp -p 1111:1111 -w /tmp ghcr.io/getzola/zola:v0.18.0 -r .github/pages build
github-pages-debug:
docker run -v `pwd`:/tmp -p 1111:1111 -w /tmp ghcr.io/getzola/zola:v0.18.0 -r .github/pages serve -i 0.0.0.0
docker run --rm -v "$(PWD)":/tmp -p 1111:1111 -w /tmp ghcr.io/getzola/zola:v0.18.0 -r .github/pages build
github-pages-debug:
docker run --rm -v "$(PWD)":/tmp -p 1111:1111 -w /tmp ghcr.io/getzola/zola:v0.18.0 -r .github/pages serve -i 0.0.0.0

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants