@mokoconsulting/mcp-mokogitea-api 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,19 +13,6 @@
13
13
  name: "Generic: Project CI"
14
14
 
15
15
  on:
16
- push:
17
- branches:
18
- - main
19
- - dev
20
- - dev/**
21
- - rc/**
22
- - version/**
23
- pull_request:
24
- branches:
25
- - main
26
- - dev
27
- - dev/**
28
- - rc/**
29
16
  workflow_dispatch:
30
17
 
31
18
  permissions:
@@ -25,10 +25,6 @@
25
25
  name: "Universal: Secret Scanning"
26
26
 
27
27
  on:
28
- pull_request:
29
- branches:
30
- - main
31
- - 'dev/**'
32
28
  schedule:
33
29
  - cron: '0 5 * * 1' # Weekly Monday 05:00 UTC
34
30
  workflow_dispatch:
@@ -4,8 +4,8 @@
4
4
  #
5
5
  # FILE INFORMATION
6
6
  # DEFGROUP: Gitea.Workflow
7
- # INGROUP: mokocli.CI
8
- # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
7
+ # INGROUP: moko-platform.CI
8
+ # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform
9
9
  # PATH: /templates/workflows/universal/pr-check.yml.template
10
10
  # VERSION: 09.23.00
11
11
  # BRIEF: PR gate — branch policy + code validation before merge
@@ -96,6 +96,32 @@ jobs:
96
96
  echo "Branch policy: OK (${HEAD} → ${BASE})"
97
97
  echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY
98
98
 
99
+ # ── Secret Scanning ──────────────────────────────────────────────────
100
+ gitleaks:
101
+ name: Secret Scan
102
+ runs-on: ubuntu-latest
103
+ steps:
104
+ - name: Checkout
105
+ uses: actions/checkout@v4
106
+ with:
107
+ fetch-depth: 0
108
+
109
+ - name: Install Gitleaks
110
+ run: |
111
+ GITLEAKS_VERSION="8.21.2"
112
+ curl -sSL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
113
+ | tar -xz -C /usr/local/bin gitleaks
114
+
115
+ - name: Scan PR commits for secrets
116
+ run: |
117
+ if gitleaks detect --source . --verbose \
118
+ --log-opts=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} 2>&1; then
119
+ echo "**No secrets detected.**" >> $GITHUB_STEP_SUMMARY
120
+ else
121
+ echo "::error::Potential secrets detected in PR commits"
122
+ exit 1
123
+ fi
124
+
99
125
  # ── Code Validation ────────────────────────────────────────────────────
100
126
  validate:
101
127
  name: Validate PR
@@ -0,0 +1,66 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+ #
5
+ # FILE INFORMATION
6
+ # DEFGROUP: Gitea.Workflow
7
+ # INGROUP: MokoPlatform.Universal
8
+ # REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
9
+ # PATH: /.mokogitea/workflows/rc-revert.yml
10
+ # VERSION: 09.23.00
11
+ # BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge
12
+
13
+ name: "RC Revert"
14
+
15
+ on:
16
+ pull_request:
17
+ types: [closed]
18
+
19
+ env:
20
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
21
+
22
+ jobs:
23
+ revert:
24
+ name: Rename rc/ back to dev/
25
+ runs-on: ubuntu-latest
26
+ if: >-
27
+ github.event.pull_request.merged == false &&
28
+ startsWith(github.event.pull_request.head.ref, 'rc/')
29
+
30
+ steps:
31
+ - name: Rename branch
32
+ run: |
33
+ BRANCH="${{ github.event.pull_request.head.ref }}"
34
+ SUFFIX="${BRANCH#rc/}"
35
+ DEV_BRANCH="dev/${SUFFIX}"
36
+ API="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}/api/v1/repos/${{ github.repository }}/branches"
37
+ TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
38
+
39
+ # Create dev/ branch from rc/ branch
40
+ STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \
41
+ -H "Authorization: token ${TOKEN}" \
42
+ -H "Content-Type: application/json" \
43
+ -d "{\"new_branch_name\": \"${DEV_BRANCH}\", \"old_branch_name\": \"${BRANCH}\"}" \
44
+ "${API}" 2>/dev/null || true)
45
+
46
+ if [ "$STATUS" = "201" ]; then
47
+ echo "Created branch: ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY
48
+ else
49
+ echo "::error::Failed to create ${DEV_BRANCH} from ${BRANCH} (HTTP ${STATUS})"
50
+ exit 1
51
+ fi
52
+
53
+ # Delete rc/ branch
54
+ ENCODED=$(php -r "echo rawurlencode('${BRANCH}');")
55
+ STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
56
+ -H "Authorization: token ${TOKEN}" \
57
+ "${API}/${ENCODED}" 2>/dev/null || true)
58
+
59
+ if [ "$STATUS" = "204" ]; then
60
+ echo "Deleted branch: ${BRANCH}" >> $GITHUB_STEP_SUMMARY
61
+ else
62
+ echo "::warning::Failed to delete ${BRANCH} (HTTP ${STATUS})"
63
+ fi
64
+
65
+ echo "### RC Reverted" >> $GITHUB_STEP_SUMMARY
66
+ echo "${BRANCH} → ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,73 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+ #
5
+ # FILE INFORMATION
6
+ # DEFGROUP: Gitea.Workflow
7
+ # INGROUP: MokoPlatform.Universal
8
+ # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
9
+ # PATH: /.mokogitea/workflows/workflow-sync-trigger.yml
10
+ # VERSION: 01.01.00
11
+ # BRIEF: Trigger workflow sync to live repos when a PR is merged to main
12
+
13
+ name: "Universal: Workflow Sync Trigger"
14
+
15
+ on:
16
+ pull_request:
17
+ types: [closed]
18
+ branches:
19
+ - main
20
+
21
+ env:
22
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
23
+
24
+ jobs:
25
+ sync:
26
+ name: Sync workflows to live repos
27
+ runs-on: ubuntu-latest
28
+ if: >-
29
+ github.event.pull_request.merged == true &&
30
+ !contains(github.event.pull_request.title, '[skip sync]')
31
+
32
+ steps:
33
+ - name: Determine platform from repo name
34
+ id: platform
35
+ run: |
36
+ REPO="${{ github.event.repository.name }}"
37
+ case "$REPO" in
38
+ Template-Joomla) PLATFORM="joomla" ;;
39
+ Template-Dolibarr) PLATFORM="dolibarr" ;;
40
+ Template-Go) PLATFORM="go" ;;
41
+ Template-MCP) PLATFORM="mcp" ;;
42
+ Template-Generic) PLATFORM="" ;;
43
+ *) PLATFORM="" ;;
44
+ esac
45
+ echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
46
+ echo "Platform: ${PLATFORM:-all}"
47
+
48
+ - name: Clone mokoplatform
49
+ env:
50
+ MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
51
+ run: |
52
+ GITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
53
+ git clone --depth 1 "${GITEA_URL}/MokoConsulting/mokoplatform.git" /tmp/mokoplatform
54
+
55
+ - name: Install dependencies
56
+ run: |
57
+ cd /tmp/mokoplatform
58
+ composer install --no-dev --no-interaction --quiet 2>/dev/null || true
59
+
60
+ - name: Run workflow sync
61
+ env:
62
+ MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
63
+ run: |
64
+ ARGS="--token ${MOKOGITEA_TOKEN}"
65
+ ARGS="${ARGS} --org ${{ vars.GITEA_ORG || github.repository_owner }}"
66
+ ARGS="${ARGS} --phase repos"
67
+
68
+ PLATFORM="${{ steps.platform.outputs.platform }}"
69
+ if [ -n "$PLATFORM" ]; then
70
+ ARGS="${ARGS} --platform-filter ${PLATFORM}"
71
+ fi
72
+
73
+ php /tmp/mokoplatform/cli/workflow_sync.php ${ARGS}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mokoconsulting/mcp-mokogitea-api",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "MCP server for Gitea REST API v1 operations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- MokoStandards Repository Manifest
4
- Auto-generated by cleanup script.
5
- See: https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home
6
- -->
7
- <moko-platform xmlns="https://standards.mokoconsulting.tech/moko-platform/1.0" schema-version="1.0">
8
- <identity>
9
- <name>gitea-api-mcp</name>
10
- <org>MokoConsulting</org>
11
- <description>MCP server for Gitea REST API v1 operations — 61 tools for repos, issues, PRs, releases, branches, actions, orgs, wiki, webhooks, and more</description>
12
- <license spdx="GPL-3.0-or-later">GNU General Public License v3</license>
13
- </identity>
14
- <governance>
15
- <platform>nodejs</platform>
16
- <standards-version>04.07.00</standards-version>
17
- <standards-source>https://git.mokoconsulting.tech/MokoConsulting/moko-platform</standards-source>
18
- <last-synced>2026-05-10T19:51:11+00:00</last-synced>
19
- </governance>
20
- <build>
21
- <language>TypeScript</language>
22
- <package-type>mcp-server</package-type>
23
- <entry-point>src/</entry-point>
24
- </build>
25
- </moko-platform>