#0022 Forgejo API Integration #133
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/hottea!133
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/0022-forgejo-api-integration"
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 Forgejo API client and environment configuration.
Changes:
src/hottea/config.py—ForgejoConfigdataclass,load_config(), env var documentationsrc/hottea/forgejo.py—ForgejoClientwith user/repo ID lookup, auth error handlingtests/test_config.py— 9 teststests/test_forgejo.py— 9 tests with mocked HTTPAPI methods:
get_user_id(username)→ user IDget_repo_id(owner, repo)→ repo IDvalidate()→ existence validation stubError handling:
ForgejoAuthError(401),ForgejoNotFoundError(404),ForgejoError(network/other)Closes: #0022, #0018, #0019, #0020, #0021, #0017, #0012, #0013, #0014, #0015, #0060
5832608e85to4a32a55feaAudit Review — PR #133
Clean Forgejo API client implementation. Good use of stdlib
urllib(no extra deps), proper error handling for 401/404/network errors, solid test coverage (9 tests) with mocked HTTP.Suggestions
src/hottea/forgejo.py:46,50—data["id"]direct access raisesKeyErroron unexpected API response. Wrap with.get()or try/except for cleaner errors. Filed as #134.Summary
Result: COMMENT — 1 non-blocking suggestion filed as issue.
APPROVED. Clean Forgejo client with proper error handling and tests. Non-blocking suggestion in #134 — address at your leisure.