[PR #2877] [MERGED] add pre-commit hooks, move claude to agents. #2912

Closed
opened 2025-12-29 04:19:37 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2877
Author: @kradalby
Created: 11/11/2025
Status: Merged
Merged: 11/11/2025
Merged by: @kradalby

Base: mainHead: kradalby/agents-md


📝 Commits (9)

  • 280853a docs: convert CLAUDE.md to AGENTS.md with golangci-lint requirement
  • dfbbf8b flake: add prek and nixpkgs-fmt to dev dependencies
  • fd4e156 prek: add pre-commit configuration
  • 57e41de prek: configure prettier and golangci-lint hooks
  • 7b3cc54 formatting: apply automated fixes from pre-commit hooks
  • a91a577 prettier: changelog
  • 7f24112 prek: exclude docs/ from all formatting and checks
  • 9cea5af prek: exclude gen/ from all formatting and checks
  • 3019c03 prek: use global exclude for docs/ and gen/

📊 Changes

14 files changed (+1048 additions, -781 deletions)

View changed files

📝 .claude/agents/headscale-integration-tester.md (+10 -10)
.golangci-lint-hook.sh (+27 -0)
📝 .mcp.json (+5 -19)
.pre-commit-config.yaml (+75 -0)
AGENTS.md (+699 -0)
📝 CHANGELOG.md (+4 -2)
📝 CLAUDE.md (+1 -531)
📝 Makefile (+2 -2)
📝 README.md (+2 -0)
📝 derp-example.yaml (+1 -1)
📝 docs/logo/headscale3-dots.svg (+1 -1)
📝 docs/logo/headscale3_header_stacked_left.svg (+1 -1)
📝 flake.nix (+220 -213)
📝 integration/auth_key_test.go (+0 -1)

📄 Description

Tired of forgetting to run the linters.

This PR generalises CLAUDE.md to AGENTS.md.

It also sets up prek, a pre-commit runner (in rust, much faster than the old python one), to ensure I (and others) run the linters before committing.

claude was used in this pr.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2877 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 11/11/2025 **Status:** ✅ Merged **Merged:** 11/11/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/agents-md` --- ### 📝 Commits (9) - [`280853a`](https://github.com/juanfont/headscale/commit/280853ab2bc41ea9ac7dc486eedc7ab415eb661f) docs: convert CLAUDE.md to AGENTS.md with golangci-lint requirement - [`dfbbf8b`](https://github.com/juanfont/headscale/commit/dfbbf8b6ae50f274aa8bd626fc97f99f58e8683b) flake: add prek and nixpkgs-fmt to dev dependencies - [`fd4e156`](https://github.com/juanfont/headscale/commit/fd4e1560dbfe0f0c6c3792045ba79cb745bb61ec) prek: add pre-commit configuration - [`57e41de`](https://github.com/juanfont/headscale/commit/57e41de66ee23eb4ef3ce25fe75671901cbe7b7c) prek: configure prettier and golangci-lint hooks - [`7b3cc54`](https://github.com/juanfont/headscale/commit/7b3cc5453a6de7a32c05509b8f6f73ae076b00d9) formatting: apply automated fixes from pre-commit hooks - [`a91a577`](https://github.com/juanfont/headscale/commit/a91a5779baa2aa5e35315c5a5df10dca7bea758a) prettier: changelog - [`7f24112`](https://github.com/juanfont/headscale/commit/7f2411278b1299f4d761d7ba50da02fccd0320a9) prek: exclude docs/ from all formatting and checks - [`9cea5af`](https://github.com/juanfont/headscale/commit/9cea5afee2f6406611daf2ee6178aa3701f047b1) prek: exclude gen/ from all formatting and checks - [`3019c03`](https://github.com/juanfont/headscale/commit/3019c03dcca17e0fdbaa2f824f7bfb527c464be4) prek: use global exclude for docs/ and gen/ ### 📊 Changes **14 files changed** (+1048 additions, -781 deletions) <details> <summary>View changed files</summary> 📝 `.claude/agents/headscale-integration-tester.md` (+10 -10) ➕ `.golangci-lint-hook.sh` (+27 -0) 📝 `.mcp.json` (+5 -19) ➕ `.pre-commit-config.yaml` (+75 -0) ➕ `AGENTS.md` (+699 -0) 📝 `CHANGELOG.md` (+4 -2) 📝 `CLAUDE.md` (+1 -531) 📝 `Makefile` (+2 -2) 📝 `README.md` (+2 -0) 📝 `derp-example.yaml` (+1 -1) 📝 `docs/logo/headscale3-dots.svg` (+1 -1) 📝 `docs/logo/headscale3_header_stacked_left.svg` (+1 -1) 📝 `flake.nix` (+220 -213) 📝 `integration/auth_key_test.go` (+0 -1) </details> ### 📄 Description Tired of forgetting to run the linters. This PR generalises CLAUDE.md to AGENTS.md. It also sets up [prek](https://prek.j178.dev), a pre-commit runner (in rust, much faster than the old python one), to ensure I (and others) run the linters before committing. claude was used in this pr. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:37 +01:00
adam closed this issue 2025-12-29 04:19:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2912