From e59290802aeb93482d5a91554e3f54f2db91bce2 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 6 Jun 2026 17:51:09 -0500 Subject: [PATCH] chore: update changelog and MCP with type/security tools - Add v1.26.1-moko.06.10 changelog entry with all features - Add gitea_org_issue_types_list, gitea_issue_set_type, gitea_security_alerts to MCP - Add type_id param to issue create --- .mokogitea/mcp/src/index.ts | 51 ++++++++++++++++++++++++++++++++++++- CHANGELOG.md | 40 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) diff --git a/.mokogitea/mcp/src/index.ts b/.mokogitea/mcp/src/index.ts index ee1737f96e..0b7fc508b1 100644 --- a/.mokogitea/mcp/src/index.ts +++ b/.mokogitea/mcp/src/index.ts @@ -445,9 +445,10 @@ server.tool( assignees: z.array(z.string()).optional().describe('Usernames to assign'), status_id: z.number().optional().describe('Custom status definition ID'), priority_id: z.number().optional().describe('Custom priority definition ID'), + type_id: z.number().optional().describe('Custom type definition ID'), ...ConnectionParam, }, - async ({ owner, repo, title, body: issueBody, labels, milestone, assignees, status_id, priority_id, connection }) => { + async ({ owner, repo, title, body: issueBody, labels, milestone, assignees, status_id, priority_id, type_id, connection }) => { const c = clientFor(connection); // Search for existing issue with same title to prevent duplicates @@ -483,6 +484,7 @@ server.tool( if (issueData?.id) { if (status_id !== undefined) await c.post(`/repos/${owner}/${repo}/issues/${issueData.id}/custom-status`, { status_id }); if (priority_id !== undefined) await c.post(`/repos/${owner}/${repo}/issues/${issueData.id}/custom-priority`, { priority_id }); + if (type_id !== undefined) await c.post(`/repos/${owner}/${repo}/issues/${issueData.id}/custom-type`, { type_id }); } const out = formatResponse(res); out.content[0].text = `Updated existing issue #${existing.number} (duplicate prevented)\n${out.content[0].text}`; @@ -501,6 +503,7 @@ server.tool( if (newIssue?.id) { if (status_id !== undefined) await c.post(`/repos/${owner}/${repo}/issues/${newIssue.id}/custom-status`, { status_id }); if (priority_id !== undefined) await c.post(`/repos/${owner}/${repo}/issues/${newIssue.id}/custom-priority`, { priority_id }); + if (type_id !== undefined) await c.post(`/repos/${owner}/${repo}/issues/${newIssue.id}/custom-type`, { type_id }); } return formatResponse(res); }, @@ -2006,6 +2009,52 @@ server.tool( }, ); +// ── Issue Types (org-level) ────────────────────────────────────────────── + +server.tool( + 'gitea_org_issue_types_list', + 'List custom issue type definitions for an organization', + { + org: z.string().describe('Organization name'), + ...ConnectionParam, + }, + async ({ org, connection }) => { + const c = clientFor(connection); + return formatResponse(await c.get(`/orgs/${org}/issue-types`)); + }, +); + +server.tool( + 'gitea_issue_set_type', + 'Set custom type on an issue', + { + owner: z.string().describe('Repository owner'), + repo: z.string().describe('Repository name'), + issue_id: z.number().describe('Internal issue ID'), + type_id: z.number().describe('Type definition ID (0 to clear)'), + ...ConnectionParam, + }, + async ({ owner, repo, issue_id, type_id, connection }) => { + const c = clientFor(connection); + return formatResponse(await c.post(`/repos/${owner}/${repo}/issues/${issue_id}/custom-type`, { type_id })); + }, +); + +// ── Security ──────────────────────────────────────────────────────────── + +server.tool( + 'gitea_security_alerts', + 'List security alerts for a repository', + { + ...OwnerRepo, + ...ConnectionParam, + }, + async ({ owner, repo, connection }) => { + const c = clientFor(connection); + return formatResponse(await c.get(`/repos/${owner}/${repo}/security/alerts`)); + }, +); + // ── Start Server ──────────────────────────────────────────────────────── async function main(): Promise { diff --git a/CHANGELOG.md b/CHANGELOG.md index cb10171a4e..e85f5a7cea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to MokoGitea are documented here. Versions follow the format `v{upstream}-moko.{major}.{minor}` (e.g. `v1.26.1-moko.06.03`). +## [v1.26.1-moko.06.10] - 2026-06-06 + +* FEATURES + * feat(issues): first-class Type field with 12 auto-seeded defaults (Bug, Feature, Enhancement, Task, Documentation, Security, Roadmap, Client, Dolibarr, Infrastructure, Joomla, WaaS) + * feat(issues): first-class Status field with 13 auto-seeded defaults including 7 Pending states + * feat(issues): first-class Priority field with 4 auto-seeded defaults (Critical, High, Medium, Low) + * feat(issues): Type/Status/Priority colored badges in issue list view + * feat(issues): status dropdown replaces close/reopen button in comment form + * feat(security): built-in security scanning platform with secret scanner (15 patterns) + * feat(security): Security tab in repo navigation with alerts, scan controls + * feat(wiki): hierarchical folder navigation with sidebar tree and breadcrumbs + * feat(ui): well-known file tabs (README/LICENSE/CONTRIBUTING/SECURITY/CHANGELOG) + * feat(settings): repo manifest settings with REST API and auto-sync on push + * feat(mcp): public MCP server published to npm (@mokoconsulting/mokogitea-mcp) + * feat(mcp): SSE transport, env var config, Docker support, 120+ tools + * feat(mcp): issue dedup on create, type_id/status_id/priority_id params + +* MIGRATIONS + * All org labels migrated to first-class Type/Status/Priority fields and deleted + * Type custom field (id=9) migrated to type_id and deleted + * Status custom field (id=1) deleted (replaced by first-class field) + * Priority labels migrated to priority_id + * Pending labels migrated to status definitions + * Scope labels migrated to type definitions + * Manifests populated for all 61 repos via API + +* FIXES + * fix(ui): dashboard issue count badges use label spans instead of strong tags + * fix(wiki): directory check before raw redirect for folder navigation + * fix(wiki): proper display names in sidebar tree (strip dash markers) + * fix: replace non-ASCII em dashes with hyphens for hook compatibility + * fix: hookify __init__.py for stop hook JSON validation + +* INFRASTRUCTURE + * npm: @mokoconsulting/mokogitea-mcp@1.1.0 and @mokoconsulting/mokowaas-mcp@1.0.0 + * MCP servers consolidated under moko-platform/mcp/servers/ + * Remote MCP repos renamed to hyphens + * Wiki restructured into features/, api/, operations/ folders + * Swagger API docs enabled at /api/swagger + ## [v1.26.1-moko.06.04] - 2026-06-06 * FEATURES -- 2.52.0