Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 32ea85a6dd |
@@ -4,7 +4,7 @@
|
|||||||
<name>MokoGitea</name>
|
<name>MokoGitea</name>
|
||||||
<org>MokoConsulting</org>
|
<org>MokoConsulting</org>
|
||||||
<description>Moko fork of Gitea - adding project board REST API endpoints and custom enhancements</description>
|
<description>Moko fork of Gitea - adding project board REST API endpoints and custom enhancements</description>
|
||||||
<version>06.19.00</version>
|
<version>06.18.01</version>
|
||||||
<version-prefix>v1.26.1+MOKO</version-prefix>
|
<version-prefix>v1.26.1+MOKO</version-prefix>
|
||||||
<license spdx="GPL-3.0-or-later">GNU General Public License v3</license>
|
<license spdx="GPL-3.0-or-later">GNU General Public License v3</license>
|
||||||
</identity>
|
</identity>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: Gitea.Workflow
|
||||||
# INGROUP: mokoplatform.Automation
|
# INGROUP: mokoplatform.Automation
|
||||||
# VERSION: 06.19.00
|
# VERSION: 06.18.01
|
||||||
# BRIEF: Auto-create feature branch when an issue is opened
|
# BRIEF: Auto-create feature branch when an issue is opened
|
||||||
|
|
||||||
name: "Universal: Issue Branch"
|
name: "Universal: Issue Branch"
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [06.19.00] --- 2026-06-19
|
|
||||||
|
|
||||||
## [06.18.00] --- 2026-06-19
|
## [06.18.00] --- 2026-06-19
|
||||||
|
|
||||||
## [06.17.00] --- 2026-06-18
|
## [06.17.00] --- 2026-06-18
|
||||||
@@ -10,3 +8,5 @@
|
|||||||
## [06.17.00] --- 2026-06-18
|
## [06.17.00] --- 2026-06-18
|
||||||
|
|
||||||
## [06.16.00] --- 2026-06-18
|
## [06.16.00] --- 2026-06-18
|
||||||
|
|
||||||
|
## [06.15.00] --- 2026-06-18
|
||||||
|
|||||||
@@ -434,7 +434,6 @@ func prepareMigrationTasks() []*migration {
|
|||||||
newMigration(354, "Add org wiki settings to user table", v1_27.AddOrgWikiSettings),
|
newMigration(354, "Add org wiki settings to user table", v1_27.AddOrgWikiSettings),
|
||||||
newMigration(355, "Migrate update server metadata to repo manifest", v1_27.MigrateUpdateServerFieldsToManifest),
|
newMigration(355, "Migrate update server metadata to repo manifest", v1_27.MigrateUpdateServerFieldsToManifest),
|
||||||
newMigration(356, "Rename package_type to extension_type in repo manifest", v1_27.RenamePackageTypeToExtensionType),
|
newMigration(356, "Rename package_type to extension_type in repo manifest", v1_27.RenamePackageTypeToExtensionType),
|
||||||
newMigration(357, "Drop display_name from repo manifest and update stream config", v1_27.DropDisplayNameColumns),
|
|
||||||
}
|
}
|
||||||
return preparedMigrations
|
return preparedMigrations
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
// Copyright 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
package v1_27
|
|
||||||
|
|
||||||
import "xorm.io/xorm"
|
|
||||||
|
|
||||||
// DropDisplayNameColumns removes the display_name column from repo_manifest
|
|
||||||
// and update_stream_config. Display name is now computed from extension_type + name.
|
|
||||||
func DropDisplayNameColumns(x *xorm.Engine) error {
|
|
||||||
if _, err := x.Exec("ALTER TABLE repo_manifest DROP COLUMN IF EXISTS display_name"); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
_, err := x.Exec("ALTER TABLE update_stream_config DROP COLUMN IF EXISTS display_name")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
@@ -39,6 +39,7 @@ type RepoMetadata struct {
|
|||||||
ElementName string `xorm:"TEXT 'element_name'"` // full element name override, e.g. "pkg_mokowaas" (auto-constructed if empty)
|
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)
|
// 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
|
Maintainer string `xorm:"TEXT 'maintainer'"` // maintainer/author name
|
||||||
MaintainerURL string `xorm:"TEXT 'maintainer_url'"` // maintainer website
|
MaintainerURL string `xorm:"TEXT 'maintainer_url'"` // maintainer website
|
||||||
InfoURL string `xorm:"TEXT 'info_url'"` // extension info/product page URL
|
InfoURL string `xorm:"TEXT 'info_url'"` // extension info/product page URL
|
||||||
@@ -114,20 +115,6 @@ func (m *RepoMetadata) ElementNameMismatch() bool {
|
|||||||
return auto != "" && m.ElementName != auto
|
return auto != "" && m.ElementName != auto
|
||||||
}
|
}
|
||||||
|
|
||||||
// DerivedDisplayName computes the display name from ExtensionType and Name.
|
|
||||||
// Format: "Package - MokoSuiteBackup" (titlecased type + repo name).
|
|
||||||
// Falls back to just the Name if ExtensionType is empty.
|
|
||||||
func (m *RepoMetadata) DerivedDisplayName() string {
|
|
||||||
if m.Name == "" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
if m.ExtensionType == "" {
|
|
||||||
return m.Name
|
|
||||||
}
|
|
||||||
title := strings.ToUpper(m.ExtensionType[:1]) + m.ExtensionType[1:]
|
|
||||||
return title + " - " + m.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetRepoMetadata returns the metadata for a repo, or nil if none exists.
|
// GetRepoMetadata returns the metadata for a repo, or nil if none exists.
|
||||||
func GetRepoMetadata(ctx context.Context, repoID int64) (*RepoMetadata, error) {
|
func GetRepoMetadata(ctx context.Context, repoID int64) (*RepoMetadata, error) {
|
||||||
m := new(RepoMetadata)
|
m := new(RepoMetadata)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ type UpdateStreamConfig struct {
|
|||||||
KeyPrefix string `xorm:"VARCHAR(20) 'key_prefix'"` // org-specific license key prefix (e.g. "ACME")
|
KeyPrefix string `xorm:"VARCHAR(20) 'key_prefix'"` // org-specific license key prefix (e.g. "ACME")
|
||||||
// Extension metadata — used in update feed generation.
|
// Extension metadata — used in update feed generation.
|
||||||
ExtensionName string `xorm:"TEXT 'extension_name'"` // element identifier (e.g. pkg_mokowaas, com_mokowaas)
|
ExtensionName string `xorm:"TEXT 'extension_name'"` // element identifier (e.g. pkg_mokowaas, com_mokowaas)
|
||||||
|
DisplayName string `xorm:"TEXT 'display_name'"` // human-readable name (e.g. "Package - MokoWaaS")
|
||||||
Description string `xorm:"TEXT"` // short description for update feeds
|
Description string `xorm:"TEXT"` // short description for update feeds
|
||||||
ExtensionType string `xorm:"VARCHAR(50) 'extension_type'"` // component, module, plugin, package, template, library
|
ExtensionType string `xorm:"VARCHAR(50) 'extension_type'"` // component, module, plugin, package, template, library
|
||||||
Maintainer string `xorm:"TEXT"` // maintainer/author name
|
Maintainer string `xorm:"TEXT"` // maintainer/author name
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
repo_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/repo"
|
|
||||||
updateserver_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/updateserver"
|
updateserver_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/updateserver"
|
||||||
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs"
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs"
|
||||||
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/timeutil"
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/timeutil"
|
||||||
@@ -22,11 +21,6 @@ func GetLicenseSettings(ctx *context.APIContext) {
|
|||||||
ctx.JSON(http.StatusOK, &structs.LicenseSettings{})
|
ctx.JSON(http.StatusOK, &structs.LicenseSettings{})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Compute display_name from repo metadata
|
|
||||||
var displayName string
|
|
||||||
if meta, err := repo_model.GetRepoMetadata(ctx, ctx.Repo.Repository.ID); err == nil && meta != nil {
|
|
||||||
displayName = meta.DerivedDisplayName()
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusOK, &structs.LicenseSettings{
|
ctx.JSON(http.StatusOK, &structs.LicenseSettings{
|
||||||
LicensingEnabled: cfg.LicensingEnabled,
|
LicensingEnabled: cfg.LicensingEnabled,
|
||||||
RequireKey: cfg.RequireKey,
|
RequireKey: cfg.RequireKey,
|
||||||
@@ -34,7 +28,7 @@ func GetLicenseSettings(ctx *context.APIContext) {
|
|||||||
Platform: cfg.Platform,
|
Platform: cfg.Platform,
|
||||||
SupportURL: cfg.SupportURL,
|
SupportURL: cfg.SupportURL,
|
||||||
ExtensionName: cfg.ExtensionName,
|
ExtensionName: cfg.ExtensionName,
|
||||||
DisplayName: displayName,
|
DisplayName: cfg.DisplayName,
|
||||||
ExtensionType: cfg.ExtensionType,
|
ExtensionType: cfg.ExtensionType,
|
||||||
Maintainer: cfg.Maintainer,
|
Maintainer: cfg.Maintainer,
|
||||||
MaintainerURL: cfg.MaintainerURL,
|
MaintainerURL: cfg.MaintainerURL,
|
||||||
@@ -57,6 +51,7 @@ func UpdateLicenseSettings(ctx *context.APIContext) {
|
|||||||
Platform: form.Platform,
|
Platform: form.Platform,
|
||||||
SupportURL: form.SupportURL,
|
SupportURL: form.SupportURL,
|
||||||
ExtensionName: form.ExtensionName,
|
ExtensionName: form.ExtensionName,
|
||||||
|
DisplayName: form.DisplayName,
|
||||||
ExtensionType: form.ExtensionType,
|
ExtensionType: form.ExtensionType,
|
||||||
Maintainer: form.Maintainer,
|
Maintainer: form.Maintainer,
|
||||||
MaintainerURL: form.MaintainerURL,
|
MaintainerURL: form.MaintainerURL,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ type apiMetadata struct {
|
|||||||
Platform string `json:"platform"`
|
Platform string `json:"platform"`
|
||||||
StandardsVersion string `json:"standards_version"`
|
StandardsVersion string `json:"standards_version"`
|
||||||
StandardsSource string `json:"standards_source"`
|
StandardsSource string `json:"standards_source"`
|
||||||
DisplayName string `json:"display_name"` // read-only, computed from extension_type + name
|
DisplayName string `json:"display_name"`
|
||||||
Maintainer string `json:"maintainer"`
|
Maintainer string `json:"maintainer"`
|
||||||
MaintainerURL string `json:"maintainer_url"`
|
MaintainerURL string `json:"maintainer_url"`
|
||||||
InfoURL string `json:"info_url"`
|
InfoURL string `json:"info_url"`
|
||||||
@@ -72,7 +72,7 @@ func GetRepoMetadata(ctx *context.APIContext) {
|
|||||||
Platform: m.Platform,
|
Platform: m.Platform,
|
||||||
StandardsVersion: m.StandardsVersion,
|
StandardsVersion: m.StandardsVersion,
|
||||||
StandardsSource: m.StandardsSource,
|
StandardsSource: m.StandardsSource,
|
||||||
DisplayName: m.DerivedDisplayName(),
|
DisplayName: m.DisplayName,
|
||||||
Maintainer: m.Maintainer,
|
Maintainer: m.Maintainer,
|
||||||
MaintainerURL: m.MaintainerURL,
|
MaintainerURL: m.MaintainerURL,
|
||||||
InfoURL: m.InfoURL,
|
InfoURL: m.InfoURL,
|
||||||
@@ -115,6 +115,7 @@ func UpdateRepoMetadata(ctx *context.APIContext) {
|
|||||||
Platform: req.Platform,
|
Platform: req.Platform,
|
||||||
StandardsVersion: req.StandardsVersion,
|
StandardsVersion: req.StandardsVersion,
|
||||||
StandardsSource: req.StandardsSource,
|
StandardsSource: req.StandardsSource,
|
||||||
|
DisplayName: req.DisplayName,
|
||||||
Maintainer: req.Maintainer,
|
Maintainer: req.Maintainer,
|
||||||
MaintainerURL: req.MaintainerURL,
|
MaintainerURL: req.MaintainerURL,
|
||||||
InfoURL: req.InfoURL,
|
InfoURL: req.InfoURL,
|
||||||
@@ -142,7 +143,7 @@ func UpdateRepoMetadata(ctx *context.APIContext) {
|
|||||||
Platform: m.Platform,
|
Platform: m.Platform,
|
||||||
StandardsVersion: m.StandardsVersion,
|
StandardsVersion: m.StandardsVersion,
|
||||||
StandardsSource: m.StandardsSource,
|
StandardsSource: m.StandardsSource,
|
||||||
DisplayName: m.DerivedDisplayName(),
|
DisplayName: m.DisplayName,
|
||||||
Maintainer: m.Maintainer,
|
Maintainer: m.Maintainer,
|
||||||
MaintainerURL: m.MaintainerURL,
|
MaintainerURL: m.MaintainerURL,
|
||||||
InfoURL: m.InfoURL,
|
InfoURL: m.InfoURL,
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ func SettingsUpdateStreamsPost(ctx *context.Context) {
|
|||||||
SupportURL: ctx.FormString("support_url"),
|
SupportURL: ctx.FormString("support_url"),
|
||||||
KeyPrefix: strings.ToUpper(strings.TrimSpace(ctx.FormString("key_prefix"))),
|
KeyPrefix: strings.ToUpper(strings.TrimSpace(ctx.FormString("key_prefix"))),
|
||||||
ExtensionName: ctx.FormString("extension_name"),
|
ExtensionName: ctx.FormString("extension_name"),
|
||||||
|
DisplayName: ctx.FormString("display_name"),
|
||||||
Description: ctx.FormString("feed_description"),
|
Description: ctx.FormString("feed_description"),
|
||||||
ExtensionType: ctx.FormString("extension_type"),
|
ExtensionType: ctx.FormString("extension_type"),
|
||||||
Maintainer: ctx.FormString("maintainer"),
|
Maintainer: ctx.FormString("maintainer"),
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ func saveMetadata(ctx *context.Context) {
|
|||||||
manifest.ElementName = existing.ElementName
|
manifest.ElementName = existing.ElementName
|
||||||
manifest.StandardsVersion = existing.StandardsVersion
|
manifest.StandardsVersion = existing.StandardsVersion
|
||||||
manifest.StandardsSource = existing.StandardsSource
|
manifest.StandardsSource = existing.StandardsSource
|
||||||
|
manifest.DisplayName = existing.DisplayName
|
||||||
manifest.Maintainer = existing.Maintainer
|
manifest.Maintainer = existing.Maintainer
|
||||||
manifest.MaintainerURL = existing.MaintainerURL
|
manifest.MaintainerURL = existing.MaintainerURL
|
||||||
manifest.Language = existing.Language
|
manifest.Language = existing.Language
|
||||||
|
|||||||
@@ -696,6 +696,7 @@ func handleSettingsPostAdvanced(ctx *context.Context) {
|
|||||||
DownloadGating: form.DownloadGating,
|
DownloadGating: form.DownloadGating,
|
||||||
SupportURL: form.SupportURL,
|
SupportURL: form.SupportURL,
|
||||||
ExtensionName: form.ExtensionName,
|
ExtensionName: form.ExtensionName,
|
||||||
|
DisplayName: form.DisplayName,
|
||||||
ExtensionType: form.ExtensionType,
|
ExtensionType: form.ExtensionType,
|
||||||
TargetVersion: form.TargetVersion,
|
TargetVersion: form.TargetVersion,
|
||||||
Maintainer: form.Maintainer,
|
Maintainer: form.Maintainer,
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ type RepoSettingForm struct {
|
|||||||
DownloadGating string
|
DownloadGating string
|
||||||
SupportURL string
|
SupportURL string
|
||||||
ExtensionName string
|
ExtensionName string
|
||||||
|
DisplayName string
|
||||||
ExtensionType string
|
ExtensionType string
|
||||||
TargetVersion string
|
TargetVersion string
|
||||||
Maintainer string
|
Maintainer string
|
||||||
|
|||||||
@@ -198,8 +198,8 @@ func resolveExtensionMetadata(ctx context.Context, repo *repo_model.Repository,
|
|||||||
if manifest.ExtensionType != "" {
|
if manifest.ExtensionType != "" {
|
||||||
m.ExtType = manifest.ExtensionType
|
m.ExtType = manifest.ExtensionType
|
||||||
}
|
}
|
||||||
if dn := manifest.DerivedDisplayName(); dn != "" {
|
if manifest.DisplayName != "" {
|
||||||
m.DisplayName = dn
|
m.DisplayName = manifest.DisplayName
|
||||||
}
|
}
|
||||||
if manifest.TargetVersion != "" {
|
if manifest.TargetVersion != "" {
|
||||||
m.TargetVersion = manifest.TargetVersion
|
m.TargetVersion = manifest.TargetVersion
|
||||||
|
|||||||
@@ -86,6 +86,11 @@
|
|||||||
<input name="extension_name" value="{{.StreamConfig.ExtensionName}}" placeholder="pkg_mokowaas">
|
<input name="extension_name" value="{{.StreamConfig.ExtensionName}}" placeholder="pkg_mokowaas">
|
||||||
<p class="help">{{ctx.Locale.Tr "org.settings.extension_name_help"}}</p>
|
<p class="help">{{ctx.Locale.Tr "org.settings.extension_name_help"}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label>{{ctx.Locale.Tr "org.settings.display_name"}}</label>
|
||||||
|
<input name="display_name" value="{{.StreamConfig.DisplayName}}" placeholder="Package - MokoWaaS">
|
||||||
|
<p class="help">{{ctx.Locale.Tr "org.settings.display_name_help"}}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|||||||
@@ -67,6 +67,11 @@
|
|||||||
<input name="extension_name" value="{{if .RepoUpdateConfig}}{{.RepoUpdateConfig.ExtensionName}}{{end}}" placeholder="pkg_myextension">
|
<input name="extension_name" value="{{if .RepoUpdateConfig}}{{.RepoUpdateConfig.ExtensionName}}{{end}}" placeholder="pkg_myextension">
|
||||||
<p class="help">{{ctx.Locale.Tr "org.settings.extension_name_help"}}</p>
|
<p class="help">{{ctx.Locale.Tr "org.settings.extension_name_help"}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label>{{ctx.Locale.Tr "org.settings.display_name"}}</label>
|
||||||
|
<input name="display_name" value="{{if .RepoUpdateConfig}}{{.RepoUpdateConfig.DisplayName}}{{end}}" placeholder="Package - My Extension">
|
||||||
|
<p class="help">{{ctx.Locale.Tr "org.settings.display_name_help"}}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="two fields">
|
<div class="two fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|||||||
Reference in New Issue
Block a user