Clone
3
Home
Fun_MD edited this page 2026-03-06 23:18:39 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

JUST FOR FUN - Linus Torvalds

gitea-issue-devops-agent

Issue-Driven DevOps 产品官网
Issue → Branch → Preview Slot → Test Loop → Human-Confirmed Merge 变成标准交付引擎。

核心价值

1) 分支隔离提测

每个 issue 固定独立分支和预览槽位,主干保持稳定回归,避免提测互相覆盖。

2) 智能节省资源

按改动自动识别部署策略:skip / client_only / server_only / full_stack / infra_only
服务端未变更就不重启服务端

3) 证据化闭环

提测沉淀 commit、测试链接、环境 URL、验证步骤最终合并必须工程师人工确认。

一键安装

Linux

curl -fsSL https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.sh | bash

macOS

curl -fsSL https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.sh | bash

Windows (PowerShell)

powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.ps1 | iex"

工具使用说明

issue_audit.py

python skills/gitea-issue-devops-agent/scripts/issue_audit.py \
  --base-url https://fun-md.com \
  --repo FunMD/document-collab \
  --token <TOKEN> \
  --state all \
  --download-attachments \
  --output-dir .tmp/issue-audit

change_scope.py

python skills/gitea-issue-devops-agent/scripts/change_scope.py --repo-path . --base-ref origin/main --head-ref HEAD

preview_slot_allocator.py

python skills/gitea-issue-devops-agent/scripts/preview_slot_allocator.py --state-file .tmp/preview-slots.json --slots preview-a,preview-b --repo FunMD/document-collab --issue 48 --branch dev --ttl-hours 24 --url-template https://{slot}.qa.example.com --evict-oldest

工作流模板

  • .gitea/workflows/issue-branch-preview.yml
  • .gitea/workflows/preview-slot-reclaim.yml
  • .gitea/workflows/publish-site.yml

Skills 调用前置信息Claude Code / Codex / OpenCode

统一建议先准备这组参数:

  • repo_url
  • api_keyGitea token需 issue 读写权限)
  • modeautomatic / semi-automatic / manual
  • 可选:reviewerstest_entrydeploy_envhealth_endpointmin_quality_score

Claude Code

Skills 目录(官方支持):

  • 用户级:~/.claude/skills/<skill-name>/SKILL.md
  • 项目级:.claude/skills/<skill-name>/SKILL.md

唤起方式:

  • 显式调用:/<skill-name> [args]
  • 对话调用:直接说“使用某个 skill 处理任务”

示例:

/gitea-issue-devops-agent repo_url=https://fun-md.com/FunMD/document-collab mode=automatic
请使用 gitea-issue-devops-agent连接 repo_url=...api_key=...,以 semi-automatic 模式处理 issue #48

Codex

Skills 安装目录(当前方案):

  • ~/.codex/skills/gitea-issue-devops-agent

唤起方式:

  • 对话显式点名:$gitea-issue-devops-agent
  • 或自然语言明确要求:使用 gitea-issue-devops-agent skill

示例:

$gitea-issue-devops-agent
repo_url: https://fun-md.com/FunMD/document-collab
api_key: <TOKEN>
mode: automatic

OpenCode

Skills 目录Claude skill 兼容):

  • 项目级:.opencode/skills/<skill-name>/SKILL.md
  • 全局级:~/.config/opencode/skills/<skill-name>/SKILL.md

唤起方式:

  • 对话里明确要求使用目标 skill推荐
  • Agent 内部会通过原生 skill 工具加载(skill({name: "..."})

示例:

Use skill gitea-issue-devops-agent.
repo_url=https://fun-md.com/FunMD/document-collab
api_key=<TOKEN>
mode=manual