@mokoconsulting/mokoabs-mcp 0.0.0-stage → 4.0.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.
- package/.editorconfig +41 -0
- package/.gitattributes +94 -0
- package/.gitmessage +9 -0
- package/.mokogit/ISSUE_TEMPLATE/adr.md +110 -0
- package/.mokogit/ISSUE_TEMPLATE/bug_report.md +48 -0
- package/.mokogit/ISSUE_TEMPLATE/config.yml +18 -0
- package/.mokogit/ISSUE_TEMPLATE/documentation.md +52 -0
- package/.mokogit/ISSUE_TEMPLATE/feature_request.md +51 -0
- package/.mokogit/ISSUE_TEMPLATE/mcp_api_integration.md +48 -0
- package/.mokogit/ISSUE_TEMPLATE/mcp_connection_issue.md +69 -0
- package/.mokogit/ISSUE_TEMPLATE/mcp_tool_request.md +50 -0
- package/.mokogit/ISSUE_TEMPLATE/question.md +82 -0
- package/.mokogit/ISSUE_TEMPLATE/rfc.md +126 -0
- package/.mokogit/ISSUE_TEMPLATE/security.md +51 -0
- package/.mokogit/ISSUE_TEMPLATE/version.md +24 -0
- package/.mokogit/actions/resolve-source-dir/action.yml +72 -0
- package/.mokogit/workflows/apidocs.yml +132 -0
- package/.mokogit/workflows/auto-assign.yml +76 -0
- package/.mokogit/workflows/auto-dev-issue.yml +207 -0
- package/.mokogit/workflows/auto-release.yml +1787 -0
- package/.mokogit/workflows/branch-cleanup.yml +63 -0
- package/.mokogit/workflows/cascade.yml +645 -0
- package/.mokogit/workflows/ci-issue-reporter.yml +100 -0
- package/.mokogit/workflows/cleanup.yml +112 -0
- package/.mokogit/workflows/makefile-lint.yml +240 -0
- package/.mokogit/workflows/npm-build-test.yml +507 -0
- package/.mokogit/workflows/npm-sdk-check.yml +110 -0
- package/.mokogit/workflows/npm-tool-inventory.yml +81 -0
- package/.mokogit/workflows/pr-branch-check.yml +92 -0
- package/.mokogit/workflows/pre-release.yml +1134 -0
- package/.mokogit/workflows/rc-revert.yml +75 -0
- package/AGENTS.md +48 -0
- package/CHANGELOG.md +37 -0
- package/CODE_OF_CONDUCT.md +70 -0
- package/CONTRIBUTING.md +164 -0
- package/LICENSE +696 -0
- package/Makefile +94 -0
- package/README.md +109 -2
- package/SECURITY.md +245 -0
- package/build/README.md +7 -0
- package/dist/README.md +7 -0
- package/dist/index.js +153 -0
- package/package.json +34 -5
- package/sample/config.example.json +15 -0
- package/source/client.ts +132 -0
- package/source/config.ts +139 -0
- package/source/credentialStore.ts +216 -0
- package/source/index.ts +235 -0
- package/source/tokenReader.ts +120 -0
- package/source/types.ts +63 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,63 @@
|
|
|
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: MokoGIT.Workflow
|
|
7
|
+
# INGROUP: MokoCLI.Universal
|
|
8
|
+
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
|
9
|
+
# PATH: /.mokogit/workflows/branch-cleanup.yml
|
|
10
|
+
# VERSION: 01.00.00
|
|
11
|
+
# BRIEF: Delete feature branches after PR merge
|
|
12
|
+
|
|
13
|
+
name: "Branch Cleanup"
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
pull_request:
|
|
17
|
+
types: [closed]
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
|
|
22
|
+
env:
|
|
23
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
cleanup:
|
|
27
|
+
name: Delete merged branch
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
if: >-
|
|
30
|
+
github.event.pull_request.merged == true &&
|
|
31
|
+
github.event.pull_request.head.ref != 'dev' &&
|
|
32
|
+
github.event.pull_request.head.ref != 'main'
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- name: Delete source branch
|
|
36
|
+
# SECURITY: the PR head ref is attacker-controllable. Pass it (and the
|
|
37
|
+
# repo/token) through env so the Actions engine cannot splice it into the
|
|
38
|
+
# shell source, and validate it to a safe charset before use.
|
|
39
|
+
env:
|
|
40
|
+
MOKOGIT_TOKEN: ${{ github.token }}
|
|
41
|
+
REPO: ${{ github.repository }}
|
|
42
|
+
API_BASE: ${{ vars.MOKOGIT_URL || 'https://git.mokoconsulting.tech' }}
|
|
43
|
+
BRANCH: ${{ github.event.pull_request.head.ref }}
|
|
44
|
+
run: |
|
|
45
|
+
set -euo pipefail
|
|
46
|
+
if ! printf '%s' "${BRANCH}" | grep -Eq '^[A-Za-z0-9._/-]+$'; then
|
|
47
|
+
echo "::error::unsafe branch name; refusing to proceed"; exit 1
|
|
48
|
+
fi
|
|
49
|
+
API="${API_BASE}/api/v1/repos/${REPO}/branches"
|
|
50
|
+
# URL-encode the branch name's slashes (no PHP dependency on the runner)
|
|
51
|
+
ENCODED=$(printf '%s' "${BRANCH}" | sed 's|/|%2F|g')
|
|
52
|
+
|
|
53
|
+
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
|
|
54
|
+
-H "Authorization: token ${MOKOGIT_TOKEN}" \
|
|
55
|
+
"${API}/${ENCODED}" 2>/dev/null || true)
|
|
56
|
+
|
|
57
|
+
if [ "$STATUS" = "204" ]; then
|
|
58
|
+
echo "Deleted branch: ${BRANCH}" >> $GITHUB_STEP_SUMMARY
|
|
59
|
+
elif [ "$STATUS" = "404" ]; then
|
|
60
|
+
echo "Branch already deleted: ${BRANCH}" >> $GITHUB_STEP_SUMMARY
|
|
61
|
+
else
|
|
62
|
+
echo "::warning::Failed to delete branch ${BRANCH} (HTTP ${STATUS})"
|
|
63
|
+
fi
|