Compare commits

...

4 Commits

Author SHA1 Message Date
gitea-actions[bot] fb0b7c53d7 chore(version): pre-release bump to 06.12.04-dev [skip ci] 2026-06-07 18:31:07 +00:00
jmiller 314ad5794a Merge pull request 'feat(manifest): distribution metadata fields (phase 1 consolidation)' (#583) from feat/manifest-consolidate-phase1 into dev
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Site Health (pull_request) Has been skipped
Branch Policy Check / Verify merge target (pull_request) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 8s
PR RC Release / Build RC Release (pull_request) Failing after 25s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 2m14s
2026-06-07 18:30:08 +00:00
Jonathan Miller 0335354f0b feat(manifest): add distribution metadata fields (phase 1 consolidation)
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Access control (pull_request) Successful in 2s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 9s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Add DisplayName, Maintainer, MaintainerURL, InfoURL, TargetVersion, and
PHPMinimum to RepoManifest. These fields were previously only in
UpdateStreamConfig and are now in the manifest as the single source of
truth. Distribution section shown conditionally for joomla/wordpress/
dolibarr platforms. Closes #582 phase 1.
2026-06-07 13:26:57 -05:00
gitea-actions[bot] bfed3e16ae chore(version): pre-release bump to 06.12.03-dev [skip ci] 2026-06-07 18:15:36 +00:00
10 changed files with 144 additions and 10 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<name>MokoGitea</name>
<org>MokoConsulting</org>
<description>Moko fork of Gitea - adding project board REST API endpoints and custom enhancements</description>
<version>06.12.02</version>
<version>06.12.04</version>
<version-prefix>v1.26.1+MOKO</version-prefix>
<license spdx="GPL-3.0-or-later">GNU General Public License v3</license>
</identity>
+1 -1
View File
@@ -5,7 +5,7 @@
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: mokoplatform.Automation
# VERSION: 06.12.02
# VERSION: 06.12.04
# BRIEF: Auto-create feature branch when an issue is opened
name: "Universal: Issue Branch"
+1
View File
@@ -430,6 +430,7 @@ func prepareMigrationTasks() []*migration {
newMigration(350, "Add issue type definitions table", v1_27.AddIssueTypeDefTable),
newMigration(351, "Add CDN public flag to attachments", v1_27.AddAttachmentCDNPublic),
newMigration(352, "Add version prefix and element name to repo manifest", v1_27.AddManifestVersionPrefixAndElement),
newMigration(353, "Add distribution metadata fields to repo manifest", v1_27.AddManifestDistributionFields),
}
return preparedMigrations
}
+20
View File
@@ -0,0 +1,20 @@
// Copyright 2026 Moko Consulting <hello@mokoconsulting.tech>
// SPDX-License-Identifier: GPL-3.0-or-later
package v1_27
import "xorm.io/xorm"
// AddManifestDistributionFields adds distribution metadata fields to repo_manifest
// for update server feed generation (consolidating from UpdateStreamConfig).
func AddManifestDistributionFields(x *xorm.Engine) error {
type RepoManifest struct {
DisplayName string `xorm:"TEXT 'display_name'"`
Maintainer string `xorm:"TEXT 'maintainer'"`
MaintainerURL string `xorm:"TEXT 'maintainer_url'"`
InfoURL string `xorm:"TEXT 'info_url'"`
TargetVersion string `xorm:"TEXT 'target_version'"`
PHPMinimum string `xorm:"VARCHAR(20) 'php_minimum'"`
}
return x.Sync(new(RepoManifest))
}
+8
View File
@@ -38,6 +38,14 @@ type RepoManifest struct {
VersionPrefix string `xorm:"TEXT 'version_prefix'"` // tag prefix stripped for version display, e.g. "v1.26.1-moko."
ElementName string `xorm:"TEXT 'element_name'"` // full element name override, e.g. "pkg_mokowaas" (auto-constructed if empty)
// distribution metadata (used by update server feed generation)
DisplayName string `xorm:"TEXT 'display_name'"` // human-readable name for update feeds, e.g. "Package - MokoWaaS"
Maintainer string `xorm:"TEXT 'maintainer'"` // maintainer/author name
MaintainerURL string `xorm:"TEXT 'maintainer_url'"` // maintainer website
InfoURL string `xorm:"TEXT 'info_url'"` // extension info/product page URL
TargetVersion string `xorm:"TEXT 'target_version'"` // target platform version regex, e.g. "(5|6)\..*"
PHPMinimum string `xorm:"VARCHAR(20) 'php_minimum'"` // minimum PHP version, e.g. "8.1"
// build section
Language string `xorm:"VARCHAR(50) 'language'"` // Go, PHP, TypeScript, etc.
PackageType string `xorm:"VARCHAR(50) 'package_type'"` // application, library, plugin, module, component, package
+7
View File
@@ -2756,6 +2756,13 @@
"repo.settings.manifest_build": "Build",
"repo.settings.manifest_language": "Language",
"repo.settings.manifest_package_type": "Package Type",
"repo.settings.manifest_distribution": "Distribution",
"repo.settings.manifest_display_name": "Display Name",
"repo.settings.manifest_maintainer": "Maintainer",
"repo.settings.manifest_maintainer_url": "Maintainer URL",
"repo.settings.manifest_info_url": "Info / Product URL",
"repo.settings.manifest_target_version": "Target Platform Version",
"repo.settings.manifest_php_minimum": "Minimum PHP Version",
"repo.settings.manifest_entry_point": "Entry Point",
"repo.settings.manifest_save": "Save Manifest",
"repo.settings.manifest_saved": "Manifest settings saved.",
+24
View File
@@ -24,6 +24,12 @@ type apiManifest struct {
Platform string `json:"platform"`
StandardsVersion string `json:"standards_version"`
StandardsSource string `json:"standards_source"`
DisplayName string `json:"display_name"`
Maintainer string `json:"maintainer"`
MaintainerURL string `json:"maintainer_url"`
InfoURL string `json:"info_url"`
TargetVersion string `json:"target_version"`
PHPMinimum string `json:"php_minimum"`
Language string `json:"language"`
PackageType string `json:"package_type"`
EntryPoint string `json:"entry_point"`
@@ -67,6 +73,12 @@ func GetRepoManifest(ctx *context.APIContext) {
Platform: m.Platform,
StandardsVersion: m.StandardsVersion,
StandardsSource: m.StandardsSource,
DisplayName: m.DisplayName,
Maintainer: m.Maintainer,
MaintainerURL: m.MaintainerURL,
InfoURL: m.InfoURL,
TargetVersion: m.TargetVersion,
PHPMinimum: m.PHPMinimum,
Language: m.Language,
PackageType: m.PackageType,
EntryPoint: m.EntryPoint,
@@ -104,6 +116,12 @@ func UpdateRepoManifest(ctx *context.APIContext) {
Platform: req.Platform,
StandardsVersion: req.StandardsVersion,
StandardsSource: req.StandardsSource,
DisplayName: req.DisplayName,
Maintainer: req.Maintainer,
MaintainerURL: req.MaintainerURL,
InfoURL: req.InfoURL,
TargetVersion: req.TargetVersion,
PHPMinimum: req.PHPMinimum,
Language: req.Language,
PackageType: req.PackageType,
EntryPoint: req.EntryPoint,
@@ -126,6 +144,12 @@ func UpdateRepoManifest(ctx *context.APIContext) {
Platform: m.Platform,
StandardsVersion: m.StandardsVersion,
StandardsSource: m.StandardsSource,
DisplayName: m.DisplayName,
Maintainer: m.Maintainer,
MaintainerURL: m.MaintainerURL,
InfoURL: m.InfoURL,
TargetVersion: m.TargetVersion,
PHPMinimum: m.PHPMinimum,
Language: m.Language,
PackageType: m.PackageType,
EntryPoint: m.EntryPoint,
+26 -4
View File
@@ -18,10 +18,11 @@ const tplSettingsManifest templates.TplName = "repo/settings/manifest"
// manifestXML mirrors the .mokogitea/manifest.xml schema for XML parsing.
type manifestXML struct {
XMLName xml.Name `xml:"mokoplatform"`
Identity manifestIdentity `xml:"identity"`
Governance manifestGovernance `xml:"governance"`
Build manifestBuild `xml:"build"`
XMLName xml.Name `xml:"mokoplatform"`
Identity manifestIdentity `xml:"identity"`
Governance manifestGovernance `xml:"governance"`
Distribution manifestDistribution `xml:"distribution"`
Build manifestBuild `xml:"build"`
}
type manifestIdentity struct {
@@ -44,6 +45,15 @@ type manifestGovernance struct {
StandardsSource string `xml:"standards-source"`
}
type manifestDistribution struct {
DisplayName string `xml:"display-name"`
Maintainer string `xml:"maintainer"`
MaintainerURL string `xml:"maintainer-url"`
InfoURL string `xml:"info-url"`
TargetVersion string `xml:"target-version"`
PHPMinimum string `xml:"php-minimum"`
}
type manifestBuild struct {
Language string `xml:"language"`
PackageType string `xml:"package-type"`
@@ -98,6 +108,12 @@ func ManifestSettingsPost(ctx *context.Context) {
Platform: ctx.FormString("platform"),
StandardsVersion: ctx.FormString("standards_version"),
StandardsSource: ctx.FormString("standards_source"),
DisplayName: ctx.FormString("display_name"),
Maintainer: ctx.FormString("maintainer"),
MaintainerURL: ctx.FormString("maintainer_url"),
InfoURL: ctx.FormString("info_url"),
TargetVersion: ctx.FormString("target_version"),
PHPMinimum: ctx.FormString("php_minimum"),
Language: ctx.FormString("language"),
PackageType: ctx.FormString("package_type"),
EntryPoint: ctx.FormString("entry_point"),
@@ -149,6 +165,12 @@ func tryMigrateManifestXML(ctx *context.Context) *repo_model.RepoManifest {
Platform: mxml.Governance.Platform,
StandardsVersion: mxml.Governance.StandardsVersion,
StandardsSource: mxml.Governance.StandardsSource,
DisplayName: mxml.Distribution.DisplayName,
Maintainer: mxml.Distribution.Maintainer,
MaintainerURL: mxml.Distribution.MaintainerURL,
InfoURL: mxml.Distribution.InfoURL,
TargetVersion: mxml.Distribution.TargetVersion,
PHPMinimum: mxml.Distribution.PHPMinimum,
Language: mxml.Build.Language,
PackageType: mxml.Build.PackageType,
EntryPoint: mxml.Build.EntryPoint,
+20 -4
View File
@@ -14,10 +14,20 @@ import (
// manifestXML mirrors the .mokogitea/manifest.xml schema for XML parsing.
type manifestXML struct {
XMLName xml.Name `xml:"mokoplatform"`
Identity manifestIdentity `xml:"identity"`
Governance manifestGovernance `xml:"governance"`
Build manifestBuild `xml:"build"`
XMLName xml.Name `xml:"mokoplatform"`
Identity manifestIdentity `xml:"identity"`
Governance manifestGovernance `xml:"governance"`
Distribution manifestDistribution `xml:"distribution"`
Build manifestBuild `xml:"build"`
}
type manifestDistribution struct {
DisplayName string `xml:"display-name"`
Maintainer string `xml:"maintainer"`
MaintainerURL string `xml:"maintainer-url"`
InfoURL string `xml:"info-url"`
TargetVersion string `xml:"target-version"`
PHPMinimum string `xml:"php-minimum"`
}
type manifestIdentity struct {
@@ -88,6 +98,12 @@ func SyncManifestFromCommit(ctx context.Context, repo *repo_model.Repository, co
Platform: mxml.Governance.Platform,
StandardsVersion: mxml.Governance.StandardsVersion,
StandardsSource: mxml.Governance.StandardsSource,
DisplayName: mxml.Distribution.DisplayName,
Maintainer: mxml.Distribution.Maintainer,
MaintainerURL: mxml.Distribution.MaintainerURL,
InfoURL: mxml.Distribution.InfoURL,
TargetVersion: mxml.Distribution.TargetVersion,
PHPMinimum: mxml.Distribution.PHPMinimum,
Language: mxml.Build.Language,
PackageType: mxml.Build.PackageType,
EntryPoint: mxml.Build.EntryPoint,
+36
View File
@@ -66,6 +66,42 @@
</div>
</div>
{{if or (eq .Manifest.Platform "joomla") (eq .Manifest.Platform "wordpress") (eq .Manifest.Platform "dolibarr")}}
<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.manifest_distribution"}}</h5>
<div class="two fields">
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.manifest_display_name"}}</label>
<input name="display_name" value="{{.Manifest.DisplayName}}" placeholder="e.g. Package - MokoWaaS">
</div>
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.manifest_info_url"}}</label>
<input name="info_url" value="{{.Manifest.InfoURL}}" placeholder="https://mokoconsulting.tech/product/...">
</div>
</div>
<div class="two fields">
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.manifest_maintainer"}}</label>
<input name="maintainer" value="{{.Manifest.Maintainer}}" placeholder="Moko Consulting">
</div>
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.manifest_maintainer_url"}}</label>
<input name="maintainer_url" value="{{.Manifest.MaintainerURL}}" placeholder="https://mokoconsulting.tech">
</div>
</div>
{{if or (eq .Manifest.Platform "joomla") (eq .Manifest.Platform "wordpress")}}
<div class="two fields">
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.manifest_target_version"}}</label>
<input name="target_version" value="{{.Manifest.TargetVersion}}" placeholder="e.g. (5|6)\..*">
</div>
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.manifest_php_minimum"}}</label>
<input name="php_minimum" value="{{.Manifest.PHPMinimum}}" placeholder="e.g. 8.1">
</div>
</div>
{{end}}
{{end}}
<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.manifest_build"}}</h5>
<div class="three fields">
<div class="field">