feat: add Joomla metadata validation step to CI workflows #21

Closed
opened 2026-06-18 20:13:09 +00:00 by jmiller · 1 comment
Owner

Summary

Add a CI step that validates MokoGitea repo metadata (.mokogitea/manifest.xml) matches the actual Joomla extension manifest XML. This catches update delivery mismatches before they reach production.

Trigger

Should run on PR draft creation and all PR events — catch mismatches as early as possible, before the PR is even marked ready for review.

Implementation

Add a step to ci-joomla.yml and/or pr-check.yml that:

  1. Calls moko validate:joomla-metadata (from mokoplatform CLI)
  2. Fails the check if critical fields don't match (element, type, package_type)
  3. Warns on non-critical mismatches (version, description, display_name)

Workflow trigger config

on:
  pull_request:
    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

Example step

- name: Validate Joomla metadata
  run: |
    moko validate:joomla-metadata --ci
    if [ $? -ne 0 ]; then
      echo \"::error::Joomla metadata mismatch — update delivery will fail\"
      exit 1
    fi

Fields validated

  • package_type vs <extension type>
  • Derived element name vs <packagename> / <element>
  • display_name vs <name>
  • version consistency
  • php_minimum vs composer.json

Dependencies

  • mokoplatform #257 — the moko validate:joomla-metadata CLI command

Related

  • MokoGitea-Fork #635 — element name derivation fix that prompted this
## Summary Add a CI step that validates MokoGitea repo metadata (`.mokogitea/manifest.xml`) matches the actual Joomla extension manifest XML. This catches update delivery mismatches before they reach production. ## Trigger Should run on **PR draft creation** and all PR events — catch mismatches as early as possible, before the PR is even marked ready for review. ## Implementation Add a step to `ci-joomla.yml` and/or `pr-check.yml` that: 1. Calls `moko validate:joomla-metadata` (from mokoplatform CLI) 2. Fails the check if critical fields don't match (element, type, package_type) 3. Warns on non-critical mismatches (version, description, display_name) ### Workflow trigger config ```yaml on: pull_request: types: [opened, synchronize, reopened, converted_to_draft, ready_for_review] ``` ### Example step ```yaml - name: Validate Joomla metadata run: | moko validate:joomla-metadata --ci if [ $? -ne 0 ]; then echo \"::error::Joomla metadata mismatch — update delivery will fail\" exit 1 fi ``` ## Fields validated - `package_type` vs `<extension type>` - Derived element name vs `<packagename>` / `<element>` - `display_name` vs `<name>` - `version` consistency - `php_minimum` vs composer.json ## Dependencies - mokoplatform #257 — the `moko validate:joomla-metadata` CLI command ## Related - MokoGitea-Fork #635 — element name derivation fix that prompted this
Author
Owner

Branch created: feature/21-feat-add-joomla-metadata-validation-step

git fetch origin
git checkout feature/21-feat-add-joomla-metadata-validation-step
Branch created: [`feature/21-feat-add-joomla-metadata-validation-step`](https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla/src/branch/feature/21-feat-add-joomla-metadata-validation-step) ```bash git fetch origin git checkout feature/21-feat-add-joomla-metadata-validation-step ```
Sign in to join this conversation.