feat: migrate update_stream_config metadata to org-level custom fields #492
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
Replace the hardcoded metadata columns in
update_stream_configwith org-level repo-scoped custom fields. The Update Server feed generator and all related workflows will read from custom field values instead of the dedicated config table columns.Scope
This is a multi-phase migration that touches MokoGitea code, moko-platform workflows, and all Joomla/Dolibarr repo manifests.
Phase 1: Create Custom Fields for All Metadata
Add org-level repo-scoped custom fields matching the
update_stream_configcolumns:platformextension_namedisplay_nameextension_typetarget_versionphp_minimumsupport_urldownload_gatingkey_prefixFields already created: Platform, Package Type (maps to Extension Type), Language, Entry Point, Standards Version
Fields still needed: Extension Name, Display Name, Target Version, PHP Minimum, Support URL, Download Gating, Key Prefix
Phase 2: Populate Values from Existing Config
For every repo with an
update_stream_configrow, copy the column values into the corresponding custom field values via SQL or API.Phase 3: Update Feed Generator
Refactor
services/updateserver/joomla.go(GenerateJoomlaXML) to read metadata from custom field values instead ofUpdateStreamConfig:Same for Dolibarr, WordPress, Composer, PrestaShop, Drupal, WHMCS generators.
Phase 4: Update Licensing Settings UI
The repo Settings > Update Server page currently has form fields for extension_name, display_name, etc. These should be removed since the data now lives in Settings > Metadata.
Keep only licensing-specific settings in Update Server:
Phase 5: Refactor moko-platform
Manifest Reader
cli/manifest_read.phpcurrently reads.mokogitea/manifest.xmlGET /api/v1/repos/{owner}/{repo}/metadataWorkflows
auto-release.ymluses manifest.xml for platform detectionpr-check.ymlvalidates manifest.xml formatrepo-health.ymlchecks for manifest.xml presenceBulk Sync
automation/sync-all-repos.shpushes manifest.xml to all reposPhase 6: Remove Old Columns
Once all consumers are migrated:
update_stream_config: extension_name, display_name, description, extension_type, maintainer, maintainer_url, info_url, target_version, php_minimum, support_url, key_prefixUpdateStreamConfigPhase 7: Deprecate manifest.xml
.mokogitea/manifest.xmlfrom all reposTesting Checklist
Dependencies
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com