1.5 KiB
1.5 KiB
TASK-004: Implement the read-only Gitea API client
Status: partial through TASK-011 — identity and repository-list endpoints implemented; branch/tree/file/commit remain Owner: Codex Reviewer: Claude
Writable paths
app/src/main/java/com/ubisam/ubgitea/core/network/app/src/main/java/com/ubisam/ubgitea/data/app/src/main/java/com/ubisam/ubgitea/domain/app/src/test/java/com/ubisam/ubgitea/core/network/app/src/test/java/com/ubisam/ubgitea/data/app/src/test/java/com/ubisam/ubgitea/domain/app/build.gradle.ktsgradle/libs.versions.tomldocs/decisions/003-http-client.mdtasks/004-gitea-api-client.md
Outcome
Connect the repository browsing domain to authenticated, paginated Gitea API calls while keeping DTOs and tokens out of domain and UI layers.
Acceptance criteria
- Base URL is configurable with the approved production default.
- DTOs are separate from domain models and mapping is tested.
- Repository, branch, tree, file, and commit endpoints support pagination where provided.
- Authentication is injected without logging or exposing tokens.
- HTTP, authorization, rate-limit, parsing, cancellation, and offline failures map to typed domain failures.
- Branch, ref, owner, repository, and path values are safely encoded as individual URL components.
- Tests use a local fake server and never contact production.
Required checks
./gradlew assembleDebug
./gradlew testDebugUnitTest
./gradlew lintDebug