Skip to content

Commit 9219eb4

Browse files
committed
fix(pre-commit): correct env generation hook to use env.example
- Change pre-commit hook to generate env.example instead of overwriting .env - Use direct settings-doc command instead of make docs-env - This prevents the hook from overwriting user's BOT_TOKEN in .env file - Now generates proper env.example template for documentation
1 parent 9ba2195 commit 9219eb4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ repos:
7575
language: system
7676
types: [file, python]
7777
pass_filenames: false
78-
# Temporarily disabled - overwrites user's .env file with template
79-
# - id: settings-doc-dotenv
80-
# name: Generate settings-doc .env
81-
# description: This hook generates a .env template from pydantic.BaseSettings
82-
# to a file.
83-
# entry: make docs-env
84-
# language: system
85-
# types: [file, python]
86-
# pass_filenames: false
78+
- id: settings-doc-dotenv
79+
name: Generate settings-doc env.example
80+
description: This hook generates an env.example template from pydantic.BaseSettings
81+
to a file.
82+
entry: uv run settings-doc generate --module tux.shared.config.settings --output-format
83+
dotenv --update env.example
84+
language: system
85+
types: [file, python]
86+
pass_filenames: false
8787
# Temporarily disabled - causes conflicts with end-of-file-fixer
8888
# TODO: Re-enable once we resolve the newline handling issue
8989
# - id: settings-doc-env-example

0 commit comments

Comments
 (0)