Commit Graph

493 Commits

Author SHA1 Message Date
wyxfzgg 29ffb118f7 feat(skills): add gitlink-multi-repo-ops(多仓库协同:跨多仓库统一Issue追踪、PR状态看板、Release协调发布)
新增端到端编排型 Agent Skill,串联多个 gitlink-cli 命令完成完整自动化场景(≥3 命令/Skill 调用)。
遵循 skills 规范(SKILL.md + frontmatter),兼容 Claude Code 等 Agent 平台。
来源:GitLink 大赛 2026 子任务三(端到端自动化工作流)。
2026-07-09 22:20:15 +08:00
wyxfzgg e6206d3934 feat(skills): add gitlink-project-bootstrap(项目一键初始化:项目描述→建仓→README/LICENSE/CI配置→label/milestone/member→首批Issue→webhook)
新增端到端编排型 Agent Skill,串联多个 gitlink-cli 命令完成完整自动化场景(≥3 命令/Skill 调用)。
遵循 skills 规范(SKILL.md + frontmatter),兼容 Claude Code 等 Agent 平台。
来源:GitLink 大赛 2026 子任务三(端到端自动化工作流)。
2026-07-09 22:20:03 +08:00
wyxfzgg 3e6b5584b5 feat(skills): add gitlink-pr-gate(代码质量看门人:PR提交→自动Review→跑CI→结果汇总评论→质量达标自动合并)
新增端到端编排型 Agent Skill,串联多个 gitlink-cli 命令完成完整自动化场景(≥3 命令/Skill 调用)。
遵循 skills 规范(SKILL.md + frontmatter),兼容 Claude Code 等 Agent 平台。
来源:GitLink 大赛 2026 子任务三(端到端自动化工作流)。
2026-07-09 22:19:59 +08:00
wyxfzgg e3b349464c feat(skills): add gitlink-community-ops(社区运营自动化:新Issue自动分类→分配责任人→定期社区周报→自动发布Release Notes)
新增端到端编排型 Agent Skill,串联多个 gitlink-cli 命令完成完整自动化场景(≥3 命令/Skill 调用)。
遵循 skills 规范(SKILL.md + frontmatter),兼容 Claude Code 等 Agent 平台。
来源:GitLink 大赛 2026 子任务三(端到端自动化工作流)。
2026-07-09 22:19:55 +08:00
chroe f986634498 feat(issue): add batch-reopen and batch-comment shortcuts
在现有 batch-close/update/delete 基础上补全 Issue 批量操作:

- issue +batch-reopen  批量重新打开已关闭的 Issue
- issue +batch-comment 批量为多个 Issue 添加评论

两者均复用现有批量基础设施(collectIssueNumbers / parseBool /
fetchExistingIssue / batchCloseSummary),支持 --numbers、--from CSV、
--dry-run 预演,与 batch-close 行为一致。

reopenIssue 复用 fetchExistingIssue 保留 subject/description 后将
status_id 置为 openIssueStatusID(1);commentIssue 向
/v1/.../issues/{n}/journals POST notes。

含单元测试(dry-run 路径 + 必填参数校验)。
2026-07-09 22:13:52 +08:00
wyxfzgg eb5710bffb feat(shortcut): add capability command group + internal/capability (后端能力探测)
新增 capability 命令组 + internal/capability 包,探测 GitLink 后端各模块 API 是否就绪:

- capability +check  探测后端能力,结果缓存 24h
- capability +list   查看已缓存结果

新增 internal/capability 包:Registry 记录各域(label/notification/pm/wiki/pipeline/webhook/member/milestone/export/search/workflow)的可用状态,复用 internal/client 探测,支持 200/401/403/404 与 HTML 响应判定。
含完整单元测试、帮助文档、变更说明。register.go 仅普通注册(3行),不改其他模块渲染。
来源:GitLink 大赛 2026 子赛题一。
2026-07-09 22:05:53 +08:00
chroe b0424aa6d8 fix(api): restore API path polluted by MSYS2/Git Bash on Windows
在 Windows Git Bash (MSYS2) 环境下,gitlink-cli api GET /v1/owner/repo
的路径参数会被 MSYS2 自动改写为类似
C:/Program Files/Git/v1/owner/repo 的 Windows 路径(MSYS2 把 /v1
当成 Unix 路径转换为 Git 安装目录),导致 API 调用 404。

修复:在 runAPI 中检测路径首部是否为盘符(^[A-Za-z]:/),
若是则按常见 API 前缀(/v1/ /v2/ /api/ /users/ /projects/)
定位并还原原始 API 路径。

影响所有 Windows Git Bash 用户,跨平台兼容性修复。
2026-07-09 21:41:29 +08:00
wyxfzgg 24fb05bc2c feat(skills): add gitlink-release-notes (Release Notes 生成 Skill)
新增 Agent Skill:根据 commit 与 PR 记录生成结构化版本发布说明。

- 输入:仓库 owner/repo + 版本范围
- 输出:按 Feature/Bugfix/Breaking/Docs 分类的结构化 Release Notes(Markdown)
- 串联 gitlink-cli 的 release/pr/commit 相关命令,由 Agent 编排

属于子任务二「Release Notes 生成」场景。遵循 skills 规范(SKILL.md),兼容 Claude Code 等 Agent 平台。
来源:GitLink 大赛 2026 子赛题二。
2026-07-09 21:33:23 +08:00
wyxfzgg 1527f45dc1 feat(shortcut): add notification command group (list/read/read-all/watch)
新增 notification 命令组,封装 GitLink 通知 OpenAPI:

- notification +list     列出通知(--all/--participating/分页)
- notification +read     标记单条已读 (-i/--id)
- notification +read-all 全部标记已读
- notification +watch    关注/取消关注仓库通知 (-o/-r, --unwatch)

含单元测试(7 测试,覆盖 method/path/query)、帮助文档、变更说明。
来源:GitLink 大赛 2026 子赛题一。
2026-07-09 21:24:06 +08:00
wyxfzgg 26a8d15c15 feat(shortcut): add pm command group (project management)
新增 pm 命令组,补齐 GitLink 项目管理后端的命令化访问:

- pm +dashboards  查看项目仪表盘数据
- pm +sprints     查看 Sprint 任务列表
- pm +weekly      查看周报任务
- pm +tags        查看项目 Issue 标签
- pm +pipelines   查看项目 CI/CD 流水线列表
- pm +runs        查看项目 Action 运行记录

全部只读(GET),统一 owner/repo 自动解析与 --format json|table|yaml。
含单元测试、帮助文档 doc/commands/pm.md、变更说明 doc/changes/pm-shortcut.md。

来源:GitLink 大赛 2026 子赛题一。
2026-07-09 21:21:45 +08:00
wyxfzgg d33c3c9316 feat(shortcut): add export command group (issues/prs/contributors → CSV/JSON)
新增 export 命令组,将仓库数据导出为 CSV/JSON 文件,支撑离线分析与科研数据抽取:

- export +issues    导出 Issue 列表 (GET /v1/:owner/:repo/issues)
- export +prs       导出 PR 列表 (GET /v1/:owner/:repo/pulls)
- export +contributors 导出贡献者统计 (GET /:owner/:repo/contributors)

统一 --format csv|json 与 --output,issues/prs 支持 --state 过滤与分页。
含单元测试(HTTP 方法/路径/参数/CSV·JSON 写入,6 测试)、
帮助文档 doc/commands/export.md、变更说明 doc/changes/export-shortcut.md。

背景:此前仓库数据导出只能手工拼 Raw API;export 组将其提升为一等命令。
来源:GitLink 大赛 2026 子赛题一。
2026-07-09 21:18:25 +08:00
1os21ka23r9navae6mrro 605829335a feat(repo): add +git-tree and +blob for low-level git objects
Wraps GET /v1/:owner/:repo/git/trees/:sha and /git/blobs/:sha,
which had no CLI coverage:

- repo +git-tree -s <sha|ref> [--recursive]: paged tree entries
- repo +blob -s <sha> [--decode]: blob object; --decode prints the
  base64 content as plain text for piping

Production-verified on gitlink.org.cn (tree listing by ref, blob
fetched by SHA and decoded byte-for-byte). 2 unit tests, README
examples, bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:59:27 +00:00
Taoyouce 604303e953 test: batch delete demo files 2026-07-08 22:48:03 +08:00
Taoyouce bbc8a412ee test: batch create two files 2026-07-08 22:47:20 +08:00
1os21ka23r9navae6mrro f0e72d8a6c feat(branch): add +all and +set-default
- branch +all: full branch-name list via GET /branches/all
  (AllListService), no paging — handy for scripting and completion.
- branch +set-default: switch the repository default branch via
  PATCH /branches/update_default_branch (manager permission),
  which the CLI previously had no way to do.

Production-verified on gitlink.org.cn (full name list returned;
default branch update status 0). 2 unit tests, README examples,
bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:45:30 +00:00
1os21ka23r9navae6mrro cf42b86f65 feat(pr): add +comments, +comment-edit, +comment-delete
Completes the pull-journal comment lifecycle. The CLI could only
create PR comments (via the linked issue's journals); the dedicated
v1 pull journals endpoints also support list/update/destroy:

- pr +comments -i <num>: list a PR's journals
- pr +comment-edit -i <num> -c <journal-id> -b <text> [-s state]
- pr +comment-delete -i <num> -c <journal-id>

The server's UpdateService hard-requires state in
opened|resolved|disabled (omitting it fails with
'State不包含于列表中'), so +comment-edit always sends state,
defaulting to opened, with client-side validation of the enum.
--comment-id is integer-validated.

Production-verified full lifecycle on gitlink.org.cn:
create -> list -> edit (note updated) -> delete. 3 unit tests,
README examples, bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:43:26 +00:00
1os21ka23r9navae6mrro 443b135f47 feat(issue): add +comments, +comment-edit, +comment-delete
Completes the journal (comment) lifecycle for issues. The CLI could
only create comments; the v1 journals endpoints also support listing,
updating, and deleting:

- issue +comments -n <num>: list journals with the server's filters
  (--keyword, --category comment|operate, paging)
- issue +comment-edit -n <num> -c <journal-id> -b <text>
- issue +comment-delete -n <num> -c <journal-id>

--comment-id is integer-validated before any API call.

Production-verified full lifecycle on gitlink.org.cn: create ->
list (count reflects it) -> edit -> delete. 3 unit tests, README
examples, bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:39:25 +00:00
1os21ka23r9navae6mrro 7570a7c866 feat(repo): add +activity for the project trends feed
Wraps GET /:owner/:repo/activity (ProjectTrendsController#index) with
the server's documented filters:

- --type: Issue | PullRequest | Version
- --status: create | close | journal
- --time: only events from the past N days (integer-validated)

Production-verified on gitlink.org.cn (filtered Issue/close feed
returns trends plus aggregate counts). Unit test covers query shape
and the --time guard; README example and bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:30:20 +00:00
1os21ka23r9navae6mrro b19d45fc6f feat(repo): add +forks and +top-counts
- repo +forks: list users who forked the repository (GET /forks,
  same community time-range flags as +watchers/+stargazers)
- repo +top-counts: repository top-line counts (tags, branches,
  commits, releases, size) via GET /top_counts

Production-verified on gitlink.org.cn (77 forks on a large repo;
counts payload matches web overview). 2 unit tests, README examples,
and bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:24:59 +00:00
1os21ka23r9navae6mrro ca974f111e feat(repo): manage project topics (+topics, +topic-add, +topic-remove)
Wraps the v1 project_topics API:

- repo +topics: searchable, paginated topic list (-k keyword)
- repo +topic-add -n <name>: attach a topic; project_id auto-resolved
  from --owner/--repo (or passed via --project-id)
- repo +topic-remove -t <topic-id>: detach a topic (integer-validated)

Production-verified add/remove round-trip on gitlink.org.cn. 3 unit
tests, README examples, and bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:10:09 +00:00
1os21ka23r9navae6mrro 88df73b92d feat(repo): add +blame for line-by-line file attribution
Wraps GET /api/v1/:owner/:repo/blame (params: filepath, sha) as
repo +blame -p <path> [--ref <ref>], defaulting ref to master.

Production-verified on gitlink.org.cn (875-line file returned 274
blame parts with commit/author metadata). 2 unit tests, README
example, and bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:06:45 +00:00
1os21ka23r9navae6mrro 2e92db38d7 feat(branch): add +all and keyword filtering for +list
- branch +list -k/--keyword: filter branches by name keyword (passed
  through to the v1 branches index)
- branch +all: list all branch names via /branches/all, no pagination

Production-verified on gitlink.org.cn (keyword narrows to matching
branches; /all returns the full set). 2 new unit tests, README
examples, and en-US/zh-CN i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:03:05 +00:00
1os21ka23r9navae6mrro 3665a8698b fix(pr): post comments to the pull request journals endpoint
pr +comment (and the conversation note posted by pr +review) wrote to
POST /api/v1/:owner/:repo/issues/:issue_id/journals, which attaches
the journal to the underlying issue record. Those journals never show
up in GET /pulls/:id/journals — the list the PR conversation is built
from — so comments posted by the CLI were invisible on the pull
request page.

Post to POST /api/v1/:owner/:repo/pulls/:id/journals (payload key
"note") instead, which also drops the extra PR-detail fetch that was
only needed to resolve the issue id.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 13:52:32 +00:00
1os21ka23r9navae6mrro 1eb3b7c485 feat(repo): add repo +edit to update repository settings
Adds a repo +edit shortcut that updates repository metadata via
PATCH /:owner/:repo.json: --description, --website, --private,
--default-branch, --category-id, --language-id.

The server dispatches on which key is present (website, default_branch,
or general metadata) and the metadata path validates name/identifier,
so the command resolves them from the repository detail first and sends
each field group as its own request. Requires at least one field and
validates --private and integer IDs before any API call.

Production-verified against gitlink.org.cn (description/website update
and default-branch round-trip). Includes 6 unit tests and bilingual
README examples plus en-US/zh-CN i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 13:38:54 +00:00
Taoyouce 794210ec03 feat(wiki): auto-resolve --project-id from repository detail when omitted 2026-07-08 12:27:26 +00:00
yanchaomei 7b60431ac6 feat(workflow): add release notes command 2026-07-08 17:23:00 +08:00
林晨 (Leo Cheng) 1d81396bab
feat(alias): add alias command group with quote-aware expansion
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:43 +08:00
林晨 (Leo Cheng) ceb34d2104
feat(pr): add pr +status showing pull requests relevant to you
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:42 +08:00
林晨 (Leo Cheng) 41d2f5bbb0
feat(repo): add repo +rename to rename the current repository
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:41 +08:00
林晨 (Leo Cheng) 5511d492cb
feat(api): add --paginate and unwrap GitLink list responses in PaginateAll
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:33 +08:00
林晨 (Leo Cheng) 44d2ba0db2
feat(label): add label +clone to copy labels from another repository
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:33 +08:00
林晨 (Leo Cheng) c4a0ac1f13
feat(pr): surface merged_at in pr +view
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:32 +08:00
林晨 (Leo Cheng) 6ae52f40f7
fix(label): paginate label lookup in +update to avoid clobbering fields
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:48 +08:00
林晨 (Leo Cheng) 6e71ff9941
feat(pr): add pr +edit to update an open pull request
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:47 +08:00
林晨 (Leo Cheng) 8f5cc1637d
feat(issue): add issue +reopen to reopen a closed issue
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:47 +08:00
林晨 (Leo Cheng) e4b03e0053
fix(workflow): use status/category list filters in health and report fetchers
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:46 +08:00
林晨 (Leo Cheng) 17ec98f198
fix(i18n): add missing cmd.ignore.short group description key
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:33 +08:00
林晨 (Leo Cheng) 50bcf5bf68
feat(browse): add browse shortcut group to open repo pages in a browser
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 03:06:54 +08:00
Taoyouce 73a7947e22 feat(pr): 新增 +checkout 本地检出 PR 分支(对标 gh pr checkout) 2026-07-07 16:16:35 +00:00
Taoyouce b9cc72d81a feat(repo): 新增 +clone 使用 git 克隆仓库(对标 gh repo clone) 2026-07-07 16:10:19 +00:00
Angel123456 8ef201810b feat(skill): add gitlink-issue-triage-rules with examples
Signed-off-by: Angel123456 <Angel123456@example.org>
2026-07-07 23:14:51 +08:00
Mengz 5c16a4a70e feat: 新增 shell 自动补全命令 2026-07-07 14:52:28 +08:00
Mengz 2c47f2357a fix(skills): 根据 review 精简 pr-assessor 验证材料 2026-07-06 10:22:35 +08:00
yangsai01 48fb879506 feat(skills): add skill gitlink-graduation-thesis-repo 2026-07-06 09:54:14 +08:00
laurencewannamaker 95a8a37876 fix(output): --format table 支持资源包裹列表响应(此前 list 命令表格从不生效)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:29:15 +00:00
laurencewannamaker 16c0528427 docs: 全局参数表补 --lang 与 --jq(中英)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:27:13 +00:00
laurencewannamaker 4913cf5319 fix(output): 全局提取 flag 改名 --jq,避免与 api 子命令 --query(查询参数)语义冲突
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:26:07 +00:00
laurencewannamaker 497bd6a071 feat(output): 全局 --query/-q 点分路径输出字段提取(零依赖,对标 gh --jq)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:22:03 +00:00
laurencewannamaker b88c90ffd5 feat(pr): 全部 pr 子命令支持 --number(与 issue 命令组语义一致,--id 保留为兼容别名)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 22:50:17 +00:00
laurencewannamaker f402dce051 feat(cli): 根命令支持 --version(复用 i18n version 文案)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 22:38:46 +00:00