feat: SourceResolver queries Gitea Manifest API for entry_point (#249) #286

Merged
jmiller merged 2 commits from feature/249-source-resolver-api into main 2026-06-21 02:04:01 +00:00
Owner

Summary

SourceResolver::resolve() now checks the Gitea Manifest API entry_point field before falling back to filesystem detection. This makes the API the single source of truth for source directory resolution in CI.

Resolution order:

  1. Gitea Manifest API (entry_point) — when GA_TOKEN/GITEA_TOKEN + GITHUB_REPOSITORY are set
  2. Filesystem fallback (source/, src/, htdocs/)
  3. Default source for new repos

No callers need to change — the existing SourceResolver::resolve($root) interface is unchanged. The API check is transparent and cached per process.

Test plan

  • In CI with GA_TOKEN set: verify API is queried and entry_point used
  • Locally without token: verify filesystem fallback still works
  • php -l lib/Enterprise/SourceResolver.php passes
  • Existing tools (deploy_joomla, theme_lint, auto_detect_platform) work unchanged

Closes #249

## Summary `SourceResolver::resolve()` now checks the Gitea Manifest API `entry_point` field before falling back to filesystem detection. This makes the API the single source of truth for source directory resolution in CI. **Resolution order:** 1. Gitea Manifest API (`entry_point`) — when `GA_TOKEN`/`GITEA_TOKEN` + `GITHUB_REPOSITORY` are set 2. Filesystem fallback (`source/`, `src/`, `htdocs/`) 3. Default `source` for new repos **No callers need to change** — the existing `SourceResolver::resolve($root)` interface is unchanged. The API check is transparent and cached per process. ## Test plan - [ ] In CI with `GA_TOKEN` set: verify API is queried and `entry_point` used - [ ] Locally without token: verify filesystem fallback still works - [ ] `php -l lib/Enterprise/SourceResolver.php` passes - [ ] Existing tools (`deploy_joomla`, `theme_lint`, `auto_detect_platform`) work unchanged Closes #249
jmiller added 2 commits 2026-06-21 02:03:35 +00:00
feat: SourceResolver queries Gitea Manifest API for entry_point (#249)
Universal: Auto Version Bump / Version Bump (push) Successful in 12s
2b7e38b711
SourceResolver::resolve() now checks the Gitea Manifest API first when
GA_TOKEN/GITEA_TOKEN and GITHUB_REPOSITORY are available (CI environments).
Falls back to filesystem detection (source/, src/, htdocs/) when offline.

- API results cached per org/repo for process lifetime
- 5s timeout to avoid blocking local dev
- resolveFromApi() also available as standalone method
- org/repo derived from GITHUB_REPOSITORY env or git remote URL
chore(version): auto-bump patch 09.31.01-dev [skip ci]
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 1s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 3s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 14s
fefa44965f
jmiller merged commit 6b2cf099f7 into main 2026-06-21 02:04:01 +00:00
jmiller deleted branch feature/249-source-resolver-api 2026-06-21 02:04:02 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCLI#286