forked from chroe/gitlink-cli
24 lines
1.4 KiB
Go
24 lines
1.4 KiB
Go
package workflow
|
|
|
|
func registerProjectInit() {
|
|
register(&WorkflowDef{
|
|
Name: "project-init",
|
|
Category: "初始化",
|
|
Description: "项目一键初始化:仓库检查 → 文件/Issue/里程碑初始 → CI 配置",
|
|
Trigger: TriggerDef{
|
|
Type: "manual",
|
|
On: "manual",
|
|
},
|
|
Steps: []StepDef{
|
|
{Type: StepTypeCommand, Name: "repo-info", Purpose: "确认仓库存在并获取基础信息", Target: "repo +info"},
|
|
{Type: StepTypeCommand, Name: "existing-files", Purpose: "检查 README/LICENSE 是否已存在", Target: "file +list"},
|
|
{Type: StepTypeCommand, Name: "labels", Purpose: "检查标签库是否齐全", Target: "label +list"},
|
|
{Type: StepTypeSkill, Name: "license-check", Purpose: "AI 检查许可证合规并扫描敏感信息泄露", Target: "gitlink-license", DependsOn: []string{"existing-files"}},
|
|
{Type: StepTypeCommand, Name: "milestones", Purpose: "检查里程碑是否已创建", Target: "milestone +list"},
|
|
{Type: StepTypeCommand, Name: "existing-issues", Purpose: "检查是否已有初始 Issue", Target: "issue +list --state all --limit 10"},
|
|
{Type: StepTypeCommand, Name: "branches", Purpose: "检查分支结构", Target: "branch +list"},
|
|
{Type: StepTypeSkill, Name: "repo-audit", Purpose: "AI 综合审计仓库健康度", Target: "gitlink-repo", DependsOn: []string{"repo-info", "labels", "milestones", "branches"}},
|
|
},
|
|
})
|
|
}
|