Commit Graph

26 Commits

Author SHA1 Message Date
yetja d2689be33b test: add code with hardcoded password to test review scanner
This commit adds a line containing password = 'hardcoded12345678' which
should be detected by the code-quality workflow security scanner.
2026-07-03 22:14:05 +08:00
yetja 4eba22ed19 fix: 补充 workflow 模块所需的 AnthropicAPIKey 和 AIMode 字段 2026-07-01 17:01:15 +08:00
yetja 32785401c0 fix(shortcuts): 注册 workflow 模块到命令行 2026-07-01 16:12:29 +08:00
yetja 4b5d402e89 Merge remote-tracking branch 'origin/master' 2026-07-01 11:48:55 +08:00
yetja c3fc44cbca feat: 实现自动化工作流引擎
工作流引擎支持5个预置场景(社区运营/代码质量/项目初始化/多仓库协同/贡献者成长),
3种步骤类型(command/api/skill),2种执行模式(规则引擎/AI增强),
以及watch/schedule/daemon三种持续运行模式。

- shortcuts/workflow/: 引擎核心(类型定义、步骤执行器、AI客户端、状态管理、守护进程)
- shortcuts/workflow/rules/: 7个确定性规则引擎(triage/health/changelog/review/ci/license/repo)
- skills/gitlink-workflow/: 工作流 Skill 文档与示例
2026-07-01 11:42:30 +08:00
yetja 9368c89b4d 删除不可用的批量操作(org batch-invite),新增批量操作:issue batch-comment(批量评论)、repo batch-create/batch-fork/batch-delete(批量仓库管理)、member batch-add(批量添加成员)。展示页新增 table 格式支持(formatter 增加 toGeneric 转换),新增批量仓库管理模块,更新批量操作计数。 2026-06-04 11:33:51 +08:00
chroe d1965eb098 fix(org): batch-invite 用户名自动解析为数字ID,修正 Showcase 默认值
- batch.go: user_id 字段从传字符串改为传 int64 数字 ID
- 新增 resolveUserIDs() 自动通过 /users/list 搜索解析用户名
- 支持混合输入:用户名自动查 ID,纯数字直接用,找不到的报错
- showcase: 默认组织 ID 从 1 改为 151783,示例用户改为 chroe
2026-06-04 11:01:41 +08:00
chroe cb8dfd5537 fix: assign传递数字ID + 保留status_id防止状态被重置 2026-06-04 09:08:53 +08:00
chroe 623e065efa feat: 添加reopen/batch-reopen命令 + 修复assign使用PATCH代替PUT 2026-06-04 09:00:23 +08:00
chroe 1004bddc8d fix: watch/star 模块 resolveProjectID 兼容 project_id 字段 2026-06-03 22:57:04 +08:00
chroe d072d54995 Merge branch 'master' of https://gitlink.org.cn/chroe/gitlink-cli 2026-06-03 16:54:16 +08:00
chroe ad215e292d feat: wiki模块(5命令+sidebar自动清理)、流水线迁移新服务器、showcase参数修复、client.DoRaw
- 新增 wiki 模块:list/view/create/update/delete(含 sidebar 死链接自动清理)
- 新增 client.DoRaw() 方法(不带.json后缀,支持 gateway API)
- 修复 showcase 参数截断问题(支持引号包裹多词参数)
- 流水线迁移至新服务器 118.31.4.168
- Dockerfile 添加 GOPROXY=https://goproxy.cn,direct
- 更新 PROJECT_STATUS.md 项目文档
2026-06-03 09:05:53 +08:00
yetja d6c1a92fe3 增加批量管理仓库、批量邀请成员两个批量操作,优化现有命令的错误提示 2026-06-02 15:39:49 +08:00
Martin 999e721bd8 feat: add file, member, watch, star shortcut modules (15 commands)
- file: +list, +tree, +get, +create, +delete (5 commands, 9 tests)
- member: +list, +add, +remove, +update (4 commands, 6 tests)
- watch: +watch, +unwatch, +watchers (3 commands, 3 tests)
- star: +star, +unstar, +stars (3 commands, 3 tests)

Auto-resolve project-id for watch/star. v1 API paths preferred.
All 21 new tests passing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 08:54:18 +08:00
yetja e29a02a3d0 新增24个测试用例:issue批量操作/CRUD、org/user/pr全命令、各模块view命令。覆盖率达到74.1% 2026-05-28 15:35:17 +08:00
chroe 6042a7ea93 feat(commit): add commit shortcut module with list/view/diff/blame commands
Add 4 new commands for commit operations:
- commit list: list commits with sha/page/limit filters
- commit view: view files changed in a commit
- commit diff: show diff for a commit
- commit blame: show line-by-line file blame

Includes 5 unit tests covering all commands.
2026-05-28 14:42:34 +08:00
yetja 60b6ea6f6c 解决issue3:优化 table 输出格式及 batch-close
同时新增batch-close: 新增 Duration 字段记录批量操作耗时
2026-05-26 15:14:57 +08:00
yetja 1276744ee2 解决 issue #2: 新增 issue batch-assign、batch-label、batch-milestone 三个批量操作命令 2026-05-25 11:18:57 +08:00
yetja f024db9878 新增 7 个 Shortcut 命令(search+issues, issue+assign, issue+label, pr+review, release+download, repo+settings, repo+clone)
补全 doc/design.md Phase 3 规划的 7 个缺失命令:
- search +issues:跨仓库搜索 Issue,支持关键词/状态/所有者过滤
- issue +assign:将 Issue 指派给指定用户
- issue +label:给 Issue 添加/移除标签(逗号分隔多 ID)
- pr +review:提交 PR Review(approve/comment/request-changes)
- release +download:下载 Release 附件,不指定文件名则列出全部
- repo +settings:查看/修改仓库设置(可见性/默认分支/描述)
- repo +clone:从 GitLink 克隆仓库(支持 URL 和 owner/repo 格式)

包含 27 个新增单元测试,全部 55 个 shortcut 测试通过。
2026-05-22 20:19:18 +08:00
chroe 65f9f49e00 新增里程碑、Webhook 和标签快捷命令(16个命令)
新增三个快捷命令分组,覆盖之前只能通过原始 API 访问的 GitLink 平台功能:

- milestone(里程碑):列表、查看、创建、更新、关闭、删除
- webhook(Webhook):列表、创建、查看、更新、删除、测试推送
- label(标签):列表、创建、更新、删除

每个模块均包含 httptest 单元测试,全部 31 个测试通过(新增 17 个 + 原有 14 个)。命令总数从 40+ 增长到 56+。
2026-05-21 17:49:33 +08:00
wbtiger 6ff7384f99 fix(branch): URL-encode branch name in unprotect, add +unprotect to Skill
- shortcuts/branch/branch.go: unprotect 使用 url.PathEscape 编码分支名(含 / 的分支名)
- skills/gitlink-branch/SKILL.md: 新增 +unprotect 命令(参数、示例、Workflow)
- skills/gitlink-branch/examples/branch-workflow.md: 注意事项补 +unprotect 说明
- 注意:含 / 的分支名 unprotect 受限于 Gitea API 路由,需通过 Web 操作
2026-05-17 12:19:04 +08:00
wbtiger 20c3a4ff62 feat(pr): add pr +comment shortcut
Add a convenience command to comment on pull requests directly,
without needing to look up the underlying issue ID first.

Internally resolves the PR's issue ID via pr +view, then posts
to the issues journals API.
2026-05-14 14:23:04 +08:00
wangyue789 b2e840f498 feat(issue): add batch close shortcut with dry-run support 2026-05-13 17:27:50 +08:00
wbtiger 44147bd71a fix: Issue 操作切换到 v1 API,统一使用 project_issues_index 替代数据库 ID
改动:
- Issue 所有操作(list/view/create/update/close/comment)从旧版 /api/ 切到 /api/v1/
- flag --id/-i 改为 --number/-n(与网页 URL 中的 Issue 编号一致)
- create 增加 status_id:1(必填,v1 API 要求)
- update/close 的 HTTP 方法从 PUT 改为 PATCH(v1 API 规范)
- comment 的请求字段从 content 改为 notes(v1 API 字段名)
- comment 路径从 /issues/{id}/journals 改为 /v1/{owner}/{repo}/issues/{number}/journals

Fixes #9
2026-05-12 16:55:23 +08:00
Zhang Jinnan 46aa383d76 fix: preserve issue description on updates 2026-04-28 08:43:51 +08:00
wbtiger e892370de8 init gitlink-cli 2026-04-17 10:01:30 +08:00