feat: SourceResolver should query MokoGitea Manifest API for entry_point #249
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Summary
SourceResolvercurrently uses a filesystem fallback chain (source/,src/,htdocs/) to find the source directory. MokoGitea now has a Manifest API (GET /repos/{owner}/{repo}/manifest) that returns theentry_pointfield from the repo's.mokogitea/manifest.xml.The CLI tools should use this API as the primary source for entry-point resolution when running in CI (where
GITEA_TOKEN/MOKOGITEA_TOKENis available), falling back to the local filesystem check when offline.API Endpoint
Response includes:
Proposed Changes
SourceResolver::resolveFromApi(string $owner, string $repo, string $token, string $apiBase): ?string— calls the Manifest API and returns theentry_pointvalueSourceResolver::resolve()to accept optional API params and try API first, filesystem secondMOKOGITEA_TOKEN— pass it through to the PHP scriptsWhy
The Manifest API is the single source of truth for repo metadata. Filesystem detection can be wrong (e.g., both
source/andsrc/exist during a migration). The API reads the canonical.mokogitea/manifest.xmlvalue.Branch created:
feature/249-feat-sourceresolver-should-query-mokogit