Compare commits

..

6 Commits

Author SHA1 Message Date
jmiller c6e0a45bb4 Merge pull request 'fix(release): skip source archive generation for Joomla repos (#853)' (#854) from fix/853-skip-joomla-source-archives into dev
Deploy (Dev) / Deploy to Dev (push) Successful in 2m50s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Generic: Project CI / Tests (pull_request) Successful in 33s
Generic: Project CI / Lint & Validate (pull_request) Successful in 35s
Universal: PR Check / Wiki Update Reminder (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Successful in 8s
Universal: PR Check / Require Docs Update (pull_request) Failing after 41s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Standards Compliance / Secret Scanning (pull_request) Failing after 8s
Generic: Standards Compliance / License Header Validation (pull_request) Successful in 7s
Generic: Standards Compliance / Repository Structure Validation (pull_request) Successful in 8s
Generic: Standards Compliance / Coding Standards Check (pull_request) Successful in 9s
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Generic: Standards Compliance / Workflow Configuration Check (pull_request) Failing after 8s
Universal: PR Check / Secret Scan (pull_request) Successful in 40s
Generic: Standards Compliance / Documentation Quality Check (pull_request) Successful in 7s
Generic: Standards Compliance / README Completeness Check (pull_request) Failing after 7s
Generic: Standards Compliance / Script Integrity Validation (pull_request) Successful in 10s
Universal: Build & Release / Build & Release Pipeline (pull_request) Failing after 43s
Generic: Standards Compliance / Line Length Check (pull_request) Successful in 17s
Generic: Standards Compliance / File Naming Standards (pull_request) Successful in 6s
Generic: Standards Compliance / Git Repository Hygiene (pull_request) Successful in 39s
Generic: Standards Compliance / Version Consistency Check (pull_request) Successful in 56s
Generic: Standards Compliance / Insecure Code Pattern Detection (pull_request) Successful in 6s
Generic: Standards Compliance / Dead Code Detection (pull_request) Successful in 9s
Generic: Standards Compliance / File Size Limits (pull_request) Successful in 7s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 37s
Generic: Standards Compliance / Code Complexity Analysis (pull_request) Successful in 44s
Generic: Standards Compliance / Code Duplication Detection (pull_request) Successful in 45s
Generic: Standards Compliance / TODO/FIXME Tracking (pull_request) Successful in 6s
Generic: Standards Compliance / Dependency Vulnerability Scanning (pull_request) Successful in 42s
Generic: Standards Compliance / Unused Dependencies Check (pull_request) Successful in 38s
Generic: Standards Compliance / API Documentation Coverage (pull_request) Successful in 6s
Generic: Standards Compliance / Binary File Detection (pull_request) Successful in 1m15s
Generic: Standards Compliance / Broken Link Detection (pull_request) Successful in 8s
Generic: Standards Compliance / Accessibility Check (pull_request) Successful in 6s
Generic: Standards Compliance / Performance Metrics (pull_request) Successful in 7s
Generic: Standards Compliance / Terraform Configuration Validation (pull_request) Successful in 8s
Generic: Standards Compliance / Enterprise Readiness Check (pull_request) Successful in 44s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Generic: Standards Compliance / Repository Health Check (pull_request) Successful in 42s
Deploy (RC) / Deploy to RC (push) Failing after 5m53s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
Generic: Standards Compliance / Compliance Summary (pull_request) Has been cancelled
fix(release): skip source archive generation for Joomla repos (#853)

Closes #853
2026-07-20 14:47:44 +00:00
jmiller 154c3f77e4 Merge pull request 'test(metadata): apiMetadata npm-fields round-trip test [#847]' (#848) from fix/apimetadata-npm-fields into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 46s
Deploy (Dev) / Deploy to Dev (push) Successful in 2m40s
2026-07-20 14:37:41 +00:00
Moko Consulting c72d872557 fix(release): skip source archive generation for Joomla repos (#853)
Generic: Project CI / Lint & Validate (pull_request) Successful in 37s
Generic: Project CI / Tests (pull_request) Successful in 36s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 48s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Successful in 12s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m1s
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Joomla repos are packaged by the CI pipeline (release_package.php),
which uploads the correct installable zip/tar.gz. The server-generated
source archives are redundant and confuse users about which file to
download.

Closes #853

Claude-Session: https://claude.ai/code/session_01CwLGvFJPjoPTp9BEnSjtJf
2026-07-20 09:34:01 -05:00
jmiller 02b0377b1d Merge pull request 'fix(deploy): migrate deploy/git compose templates to MOKOGIT__ + /data/mokogit' (#846) from feature/deploy-templates-mokogit-paths into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 41s
Deploy (Dev) / Deploy to Dev (push) Successful in 3m13s
2026-07-20 14:33:57 +00:00
Moko Consulting 92d7d5563b fix(metadata): serialize npm/mcp fields in apiMetadata (npm_package/node_minimum/publish_target) [#847]
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 44s
Generic: Project CI / Tests (pull_request) Successful in 29s
Generic: Project CI / Lint & Validate (pull_request) Successful in 34s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Successful in 9s
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 40s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
The GET/PUT /api/v1/repos/{owner}/{repo}/metadata handler already declares
node_minimum, npm_package and publish_target on the apiMetadata struct and
wires both the GET-serialize and PUT-persist paths (commit 5f85b27, #363).
No round-trip test guarded that behavior, so a regression could silently
reintroduce #847 (from #827) where these DB columns are un-settable and
un-readable over the REST API.

Add an integration test that PUTs the three fields and asserts they are
echoed by the PUT response and read back by a subsequent GET.

Authored-by: Moko Consulting
2026-07-20 08:41:39 -05:00
Moko Consulting 00f3d5d6d8 fix(deploy): migrate compose templates to MOKOGIT__ prefix + /data/mokogit mounts [#839 follow-up]
Universal: Auto Version Bump / Version Bump (push) Successful in 11s
Generic: Project CI / Lint & Validate (pull_request) Successful in 28s
Generic: Project CI / Tests (pull_request) Successful in 29s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Successful in 8s
Universal: PR Check / Secret Scan (pull_request) Successful in 39s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
The image disconnect (#839) renamed the env prefix GITEA__ -> MOKOGIT__ and
moved the custom path to /data/mokogit (MOKOGIT_CUSTOM baked into the image,
no GITEA__ fallback in the binary). The deploy compose templates still used the
old GITEA__ prefix and a single :/data mount, so they produced a forge with no
config. Align dev/rc/prod templates with the validated clean running state:

- Rename all GITEA__section__key -> MOKOGIT__section__key (server + database).
- Replace the single ${GIT_DATA_DIR}:/data bind with the clean 3-mount layout:
  ${GIT_DATA_DIR}:/var/lib/gitea (WorkPath),
  ${GIT_DATA_DIR}:/data/mokogit (CustomPath),
  ${GIT_DATA_DIR}/conf:/data/mokogit/conf (app.ini, child after parent).

Ports, SSH, domain, container_name, image, healthcheck, and all ${GIT_*}
variable names are unchanged. .env.example files reference no GITEA_ vars or
old paths, so they need no changes.

Authored-by: Moko Consulting <hello@mokoconsulting.tech>
2026-07-20 07:37:44 -05:00
5 changed files with 115 additions and 30 deletions
+14 -10
View File
@@ -13,18 +13,22 @@ services:
environment:
- USER_UID=${GIT_UID}
- USER_GID=${GIT_GID}
- GITEA__server__DOMAIN=${GIT_DOMAIN}
- GITEA__server__ROOT_URL=${GIT_ROOT_URL}
- GITEA__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- GITEA__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=${GIT_DB_HOST}
- GITEA__database__NAME=${GIT_DB_NAME}
- GITEA__database__USER=${GIT_DB_USER}
- GITEA__database__PASSWD=${GIT_DB_PASSWD}
- MOKOGIT__server__DOMAIN=${GIT_DOMAIN}
- MOKOGIT__server__ROOT_URL=${GIT_ROOT_URL}
- MOKOGIT__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- MOKOGIT__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
- MOKOGIT__database__DB_TYPE=mysql
- MOKOGIT__database__HOST=${GIT_DB_HOST}
- MOKOGIT__database__NAME=${GIT_DB_NAME}
- MOKOGIT__database__USER=${GIT_DB_USER}
- MOKOGIT__database__PASSWD=${GIT_DB_PASSWD}
volumes:
# RECONCILE: live app.ini at ${GIT_DATA_DIR}/conf/app.ini (/opt/mokogit/dev/conf).
- "${GIT_DATA_DIR}:/data"
# Clean disconnect layout (#839): MOKOGIT_CUSTOM=/data/mokogit is baked into the image.
# Parent (/data/mokogit) listed before child (/data/mokogit/conf) so Docker attaches it first.
- "${GIT_DATA_DIR}:/var/lib/gitea"
- "${GIT_DATA_DIR}:/data/mokogit"
- "${GIT_DATA_DIR}/conf:/data/mokogit/conf"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
+14 -10
View File
@@ -17,19 +17,23 @@ services:
environment:
- USER_UID=${GIT_UID}
- USER_GID=${GIT_GID}
- GITEA__server__DOMAIN=${GIT_DOMAIN}
- GITEA__server__ROOT_URL=${GIT_ROOT_URL}
- GITEA__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- GITEA__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
- MOKOGIT__server__DOMAIN=${GIT_DOMAIN}
- MOKOGIT__server__ROOT_URL=${GIT_ROOT_URL}
- MOKOGIT__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- MOKOGIT__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
# DB is HOST MySQL (RECONCILE host reachability: host-gateway / socket / LAN IP).
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=${GIT_DB_HOST}
- GITEA__database__NAME=${GIT_DB_NAME}
- GITEA__database__USER=${GIT_DB_USER}
- GITEA__database__PASSWD=${GIT_DB_PASSWD}
- MOKOGIT__database__DB_TYPE=mysql
- MOKOGIT__database__HOST=${GIT_DB_HOST}
- MOKOGIT__database__NAME=${GIT_DB_NAME}
- MOKOGIT__database__USER=${GIT_DB_USER}
- MOKOGIT__database__PASSWD=${GIT_DB_PASSWD}
volumes:
# RECONCILE: live app.ini is at ${GIT_DATA_DIR}/conf/app.ini (/opt/mokogit/prod/conf).
- "${GIT_DATA_DIR}:/data"
# Clean disconnect layout (#839): MOKOGIT_CUSTOM=/data/mokogit is baked into the image.
# Parent (/data/mokogit) listed before child (/data/mokogit/conf) so Docker attaches it first.
- "${GIT_DATA_DIR}:/var/lib/gitea"
- "${GIT_DATA_DIR}:/data/mokogit"
- "${GIT_DATA_DIR}/conf:/data/mokogit/conf"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
+14 -10
View File
@@ -13,18 +13,22 @@ services:
environment:
- USER_UID=${GIT_UID}
- USER_GID=${GIT_GID}
- GITEA__server__DOMAIN=${GIT_DOMAIN}
- GITEA__server__ROOT_URL=${GIT_ROOT_URL}
- GITEA__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- GITEA__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=${GIT_DB_HOST}
- GITEA__database__NAME=${GIT_DB_NAME}
- GITEA__database__USER=${GIT_DB_USER}
- GITEA__database__PASSWD=${GIT_DB_PASSWD}
- MOKOGIT__server__DOMAIN=${GIT_DOMAIN}
- MOKOGIT__server__ROOT_URL=${GIT_ROOT_URL}
- MOKOGIT__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- MOKOGIT__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
- MOKOGIT__database__DB_TYPE=mysql
- MOKOGIT__database__HOST=${GIT_DB_HOST}
- MOKOGIT__database__NAME=${GIT_DB_NAME}
- MOKOGIT__database__USER=${GIT_DB_USER}
- MOKOGIT__database__PASSWD=${GIT_DB_PASSWD}
volumes:
# RECONCILE: live app.ini at ${GIT_DATA_DIR}/conf/app.ini (/opt/mokogit/rc/conf).
- "${GIT_DATA_DIR}:/data"
# Clean disconnect layout (#839): MOKOGIT_CUSTOM=/data/mokogit is baked into the image.
# Parent (/data/mokogit) listed before child (/data/mokogit/conf) so Docker attaches it first.
- "${GIT_DATA_DIR}:/var/lib/gitea"
- "${GIT_DATA_DIR}:/data/mokogit"
- "${GIT_DATA_DIR}/conf:/data/mokogit/conf"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
+10
View File
@@ -200,6 +200,16 @@ func GenerateReleaseArtifacts(ctx context.Context, rel *repo_model.Release) erro
} else if meta != nil {
entryPoint = meta.EntryPoint
}
// Joomla repos are packaged by the CI pipeline (release_package.php),
// which uploads the correct installable zip/tar.gz. Server-generated
// source archives are redundant and confuse users about which file to
// download, so skip them entirely.
if meta != nil && strings.EqualFold(meta.Platform, "joomla") {
log.Info("GenerateReleaseArtifacts: skipping source archives for Joomla repo %d (CI pipeline packages)", rel.RepoID)
return nil
}
wantSource := !isRootEntryPoint(entryPoint)
// Serialize the delete+attach sequence per-release so concurrent
@@ -0,0 +1,63 @@
// Copyright 2026 Moko Consulting <hello@mokoconsulting.tech>
// SPDX-License-Identifier: GPL-3.0-or-later
package integration
import (
"net/http"
"net/url"
"testing"
auth_model "code.mokoconsulting.tech/MokoConsulting/MokoGIT/models/auth"
"github.com/stretchr/testify/assert"
)
// apiMetadataResponse mirrors the subset of the repo manifest/metadata API
// payload exercised by this test. The handler struct (routers/api/v1/repo)
// is unexported, so the fields are re-declared here by their JSON tags.
type apiMetadataResponse struct {
Name string `json:"name"`
NodeMinimum string `json:"node_minimum"`
NpmPackage string `json:"npm_package"`
PublishTarget string `json:"publish_target"`
}
// TestAPIRepoMetadataNpmFieldsRoundTrip guards against regression of issue #847
// (from #827): the npm/mcp fields node_minimum, npm_package and publish_target
// must be persisted via PUT and returned via GET on the metadata endpoint,
// rather than being silently dropped by the apiMetadata struct.
func TestAPIRepoMetadataNpmFieldsRoundTrip(t *testing.T) {
onGiteaRun(t, func(t *testing.T, u *url.URL) {
// user1 is the site admin in the fixtures; the PUT route requires admin.
session := loginUser(t, "user1")
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository)
const owner, repo = "user2", "repo1"
// PUT the three npm/mcp fields.
req := NewRequestWithJSON(t, "PUT", "/api/v1/repos/"+owner+"/"+repo+"/metadata", map[string]string{
"node_minimum": "18",
"npm_package": "@moko/foo",
"publish_target": "npm",
}).AddTokenAuth(token)
resp := session.MakeRequest(t, req, http.StatusOK)
// The PUT response should echo the persisted fields.
var put apiMetadataResponse
DecodeJSON(t, resp, &put)
assert.Equal(t, "18", put.NodeMinimum)
assert.Equal(t, "@moko/foo", put.NpmPackage)
assert.Equal(t, "npm", put.PublishTarget)
// A subsequent GET should read the same values back from the DB.
req = NewRequest(t, "GET", "/api/v1/repos/"+owner+"/"+repo+"/metadata").AddTokenAuth(token)
resp = session.MakeRequest(t, req, http.StatusOK)
var got apiMetadataResponse
DecodeJSON(t, resp, &got)
assert.Equal(t, "18", got.NodeMinimum)
assert.Equal(t, "@moko/foo", got.NpmPackage)
assert.Equal(t, "npm", got.PublishTarget)
})
}