#0017 Environment Configuration #131
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/hottea!131
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/0017-environment-configuration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements environment configuration module.
Changes:
src/hottea/config.py—ForgejoConfigdataclass +load_config()with validationtests/test_config.py— 9 tests covering all fields, validation, env loadingEnv vars:
HOTTEA_FORGEJO_URL— Forgejo API base URLHOTTEA_FORGEJO_TOKEN— API tokenHOTTEA_FORGEJO_USERNAME— target usernameHOTTEA_FORGEJO_REPO— target repository nameCloses: #0017, #0012, #0013, #0014, #0015, #0060
Add ForgejoConfig dataclass and load_config() that reads from environment variables. Validates all required vars are present with helpful error messages. - load_config(): read HOTTEA_FORGEJO_{URL,TOKEN,USERNAME,REPO} - ForgejoConfig.validate(): check all fields non-empty - Module docstring documents all env vars Closes #12, #13, #14, #15, #60Audit Review — PR #131
Clean environment configuration module. Good use of frozen dataclass, proper validation reporting all missing fields, solid test coverage (9 tests) with monkeypatch for env var manipulation.
Suggestions
src/hottea/config.py—ForgejoConfig.__repr__exposestokenin plaintext via default dataclass repr. Addfield(repr=False)to the token field to prevent accidental leakage in logs/errors. Filed as #132.Summary
Result: COMMENT — 1 non-blocking suggestion filed as issue.
APPROVED. Clean env config module with proper validation. Non-blocking suggestion in #132 — address at your leisure.