feat(cli): wire moko-platform CLI to MokoGitea manifest API #505

Open
opened 2026-06-06 14:12:40 +00:00 by jmiller · 0 comments
Owner

Summary

Update the moko-platform CLI to read/write manifest settings via the MokoGitea API instead of the .mokogitea/manifest.xml file. The manifest API is now available at:

  • GET /api/v1/repos/{owner}/{repo}/manifest
  • PUT /api/v1/repos/{owner}/{repo}/manifest

Required Changes

1. CLI Commands

  • moko manifest get — read manifest from API
  • moko manifest set <field> <value> — update a single field via API
  • moko manifest migrate — trigger migration of legacy manifest.xml to API
  • moko manifest sync — push settings across multiple repos
  • moko manifest show — display current manifest in table format

2. Wire moko-platform main branch permanently to Actions

Actions workflows should have access to moko-platform CLI commands. This means:

  • The moko-platform binary should be available in the Actions runner environment
  • Or Actions can install it via a setup action
  • The CLI should authenticate using the GITEA_TOKEN environment variable

3. Backward Compatibility

  • If API returns 404 (old MokoGitea without manifest API), fall back to reading manifest.xml
  • moko manifest migrate should work even without API (just validate the XML)

Motivation

Actions workflows and CI/CD pipelines need to read/write manifest settings programmatically for version bumping, build matrix decisions, and cross-repo syncing.


Authored by Jonathan Miller (@jmiller)

## Summary Update the moko-platform CLI to read/write manifest settings via the MokoGitea API instead of the .mokogitea/manifest.xml file. The manifest API is now available at: - `GET /api/v1/repos/{owner}/{repo}/manifest` - `PUT /api/v1/repos/{owner}/{repo}/manifest` ## Required Changes ### 1. CLI Commands - `moko manifest get` — read manifest from API - `moko manifest set <field> <value>` — update a single field via API - `moko manifest migrate` — trigger migration of legacy manifest.xml to API - `moko manifest sync` — push settings across multiple repos - `moko manifest show` — display current manifest in table format ### 2. Wire moko-platform main branch permanently to Actions Actions workflows should have access to moko-platform CLI commands. This means: - The moko-platform binary should be available in the Actions runner environment - Or Actions can install it via a setup action - The CLI should authenticate using the `GITEA_TOKEN` environment variable ### 3. Backward Compatibility - If API returns 404 (old MokoGitea without manifest API), fall back to reading manifest.xml - `moko manifest migrate` should work even without API (just validate the XML) ## Motivation Actions workflows and CI/CD pipelines need to read/write manifest settings programmatically for version bumping, build matrix decisions, and cross-repo syncing. --- *Authored by Jonathan Miller (@jmiller)*
Sign in to join this conversation.