Commit Graph

850 Commits

Author SHA1 Message Date
wangyue789 cedd8b6263 feat(repo): add insight and interaction shortcuts 2026-06-04 07:17:13 +08:00
wbtiger b45241dcda Merge pull request 'docs: add missing contributors dtwdtw, puygob236, recorder' (#109) from muel/gitlink-cli:docs/add-missing-contributors into master 2026-06-04 00:29:31 +08:00
wbtiger 633bed3360 docs: add missing contributor puygob236
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 00:29:52 +08:00
wbtiger c263a2fa34 Merge pull request 'gitlink-health 开源项目健康度 Skill 贡献' (#17) from yingjie/gitlink-cli:master into master 2026-06-03 23:49:27 +08:00
wbtiger 6636175bd8 Merge pull request 'refactor: rename pr +close to pr +refuse' (#105) from muel/gitlink-cli:rename/pr-close-to-refuse into master 2026-06-03 23:20:11 +08:00
wbtiger 83fe18f8c0 refactor: rename pr +close to pr +refuse
The `pr +close` shortcut called the `refuse_merge` API, which is
misleading — "close" suggests a benign operation, but the actual
behavior is to refuse/reject the pull request permanently.

Rename the shortcut to `pr +refuse` so the name matches the API
semantics, and add a warning in the docs that it must never be used
as a substitute for `pr +merge`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 23:20:32 +08:00
wbtiger 0e13e8bdd4 Merge pull request 'feat(issue): support metadata fields' (#57) from wangyue111/gitlink-cli:feat/issue-metadata-fields into master 2026-06-03 22:37:14 +08:00
wbtiger 559e1a74f3 chore: ensure trailing newline
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 22:37:40 +08:00
15972095207 2760c47115 fix: use PUT method for wiki update and align with reference implementation
The update API requires PUT, not POST. Previous commit 7a85c6d incorrectly
changed it to POST which caused HTTP 500 errors. Also added shared test
helpers to common package and rewrote wiki tests to match reference files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:46:34 +08:00
Yingjie Shang 17e8c113f7 fix(health): address code review issues 3-6,8 2026-06-03 21:12:44 +08:00
15972095207 7a82eef766 fix: always include message field in wiki update request body
The gateway API requires the message field to be present (even as empty
string). Previously update omitted it when --message was not provided,
causing HTTP 500 errors. Also removed dead code in callWikiAPI and added
a test for update without message.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:08:54 +08:00
Yingjie Shang 41b89976aa perf(health): parallel fetch with errgroup and global rate limiter
- Replace sequential state loops with 5 parallel goroutines (errgroup)
- Global rate limiter (1000 reqs/10min, burst 5) replaces per-page sleep
- sharedState with sync.Mutex for cross-goroutine dedup and counting
- Fix getOrCreateUser/getOrCreateTag race conditions (INSERT OR IGNORE)
- Remove sleep() and API aggregates verbose output
2026-06-03 20:59:50 +08:00
Yingjie Shang 0a578bbab0 feat(health): remove per-issue detail API, add tag tables and persistence
- Drop fetchIssueDetail — issue list response already contains all needed fields
- Add tags/issue_tags/pull_tags tables with indexes
- Persist PR and Issue tags during savePull/saveIssue
- Fix issue aggregate field names (total_count/opened_count/closed_count)
- Document tag tables and queries in queries.md
2026-06-03 20:59:50 +08:00
Yingjie Shang 0da45def2b feat(shortcut): rewrite gitlink-health as a Go shortcut
Migrate health analysis from Python scripts to a native Go shortcut
for better performance and single-binary distribution. Remove the
Python collector (fetcher.py) and move schema.sql into shortcuts/health/.
2026-06-03 20:59:50 +08:00
15972095207 7a85c6df88 fix: use POST instead of PUT for wiki update (gateway compatibility) 2026-06-03 20:59:37 +08:00
15972095207 114aed603b fix: omit empty message field in wiki update to avoid 500 error 2026-06-03 20:46:01 +08:00
15972095207 5cb6ea1cd1 fix: wiki commands use correct gateway API (gateway.gitlink.org.cn) 2026-06-03 20:27:19 +08:00
whzy f4820c03b4 fix(i18n): align schema and gosec annotation 2026-06-03 13:43:56 +08:00
wyxfzgg 9474c1f432 test: 补充 alias/browse/status 单元测试
- 新增 cmd/alias/alias_test.go: 8 个测试(加载/保存/覆盖/删除/无效YAML/子命令结构)
- 新增 cmd/browse/browse_test.go: 5 个测试(命令结构/参数校验/示例内容)
- 新增 cmd/status/status_test.go: 5 个测试(命令结构/token来源判断)

关联 Issue: #14
2026-06-03 12:39:48 +08:00
wyxfzgg b887e5053d feat: 新增安装脚本 + CI 配置 + 命令帮助文档 + 跨平台验证报告
- 新增 scripts/install.sh: Linux/macOS 一键安装脚本
- 新增 scripts/install.ps1: Windows PowerShell 安装脚本
- 修改 .devops/ci.yml: 更新 CI 支持 wyx_branch 分支
- 新增 doc/commands/pm.md: pm 模块命令参考手册
- 新增 doc/commands/wiki.md: wiki 模块命令参考手册
- 新增 doc/commands/alias-browse-status.md: alias/browse/status 命令参考手册
- 新增 doc/commands/export.md: export 模块命令参考手册
- 新增 doc/commands/cross-platform.md: 跨平台兼容性验证报告

关联 Issue: #16
2026-06-03 12:07:13 +08:00
wyxfzgg 2cc0e5c08b feat: 新建 export 模块,添加 3 条数据导出命令 (issues/prs/contributors)
- 新增 shortcuts/export/export.go: 3 条 Shortcut 命令,支持 CSV/JSON 格式导出
- 新增 shortcuts/export/export_test.go: 7 个测试函数
- 修改 shortcuts/register.go: 注册 export 模块,修复重复 webhook import

关联 Issue: #15
2026-06-03 12:00:04 +08:00
wyxfzgg a28a8eae8a feat: 新增 alias/browse/status 三个开发者体验命令
- 新增 cmd/alias/alias.go: 管理命令别名 (+list/+set/+delete)
- 新增 cmd/browse/browse.go: 在浏览器中打开 GitLink 页面(跨平台)
- 新增 cmd/status/status.go: 显示登录状态和上下文信息
- 修改 cmd/root.go: 注册三个新命令

关联 Issue: #14
2026-06-03 11:50:33 +08:00
wyxfzgg 6bcd8b65d2 feat: 新建 wiki 模块,添加 5 条 Wiki 管理命令 (pages/get/create/update/delete)
- 新增 shortcuts/wiki/wiki.go: 5 条 Shortcut 命令
- 新增 shortcuts/wiki/wiki_test.go: 9 个测试函数,覆盖正常/异常/缺少参数场景
- 修改 shortcuts/register.go: 注册 wiki 模块

关联 Issue: #13
2026-06-03 11:39:55 +08:00
wyxfzgg b4cfdb753e feat: 新建 pm 模块,添加 6 条项目管理命令 (dashboards/sprints/weekly/tags/pipelines/runs)
- 新增 shortcuts/pm/pm.go: 6 条 Shortcut 命令
- 新增 shortcuts/pm/pm_test.go: 单元测试覆盖
- 修改 shortcuts/register.go: 注册 pm 模块
- 修复 register.go 中 milestone 描述缺少逗号的语法问题

关联 Issue: #12
2026-06-03 11:27:44 +08:00
林迪文 d478de59a3 feat: 新增 6 个 Agent Skill + 收窄 gitlink-search 触发范围
新增 Skill:
- gitlink-onboarding: 新人入门引导,帮助新贡献者发现适合入门的 Issue
- gitlink-issue-triage: Issue 智能分拣,按类型/紧急度/复杂度分类并生成分拣报告
- gitlink-research-tracker: 技术调研报告生成,多维度评估+成熟度评分+趋势洞察
- gitlink-contributor-insight: 贡献者活跃度分析,支持命令可用性降级适配
- gitlink-ci-health: CI 健康巡检,通过 repo +info 检测 DevOps 状态
- gitlink-notification-digest: 通知摘要,支持 source 字段分类和批量已读

修改:
- gitlink-search: 收窄描述避免与 research-tracker 触发冲突

每个 Skill 均包含使用示例。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 10:36:13 +08:00
lindiwen23 eae0269171 Merge pull request 'fix(notification-digest): v2.0.0 修正虚构 notification 命令' (#11) from dw into master 2026-06-03 10:32:30 +08:00
林迪文 94d5115789 fix(notification-digest): v2.0.0 — 修正虚构的 notification 命令为实际 messages API
- notification +list/+read/+read-all 均不存在,替换为 gitlink-cli api 调用
- API 端点: GET /api/users/{owner}/messages.json
- 标记已读: POST /api/users/{owner}/messages/{id}/read
- 添加 CLI 路径 Bug 说明(前导 / 导致解析错误)
- 补充完整 source 枚举值表(30+ 个枚举)
- 新增 EXAMPLES.md(手动执行 + Agent 测试两个样例)
- gitlink-shared/api-reference.md 补充消息 API 章节

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 10:31:42 +08:00
lindiwen23 dd82cf4d3f Merge pull request 'feat(contributor-insight): 更新至 v1.1.0,新增执行样例与命令可用性适配' (#10) from dw into master 2026-06-03 10:30:23 +08:00
林迪文 7c293f9b5a feat(contributor-insight): 更新至 v1.1.0,新增 EXAMPLES.md 和实际执行样例
- 新增命令可用性声明(标注 repo +contributors/user +heatmap 等不可用命令及替代方案)
- 重写工作流步骤:贡献者列表从 pr +list 提取,活跃度从 PR 时间戳推算
- 新增年轻项目(<30天)分级放宽规则
- 扩充异常场景处理表(新增 3 种场景)
- 新增 EXAMPLES.md:手动执行 + Agent 调用两种完整样例
- 新增 examples/jiangtx-gitlink-cli.md:原始命令输出数据附录
- 同步 ci-health EXAMPLES.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 10:29:52 +08:00
林迪文 dd805951a5 feat: 新增 3 个 Skill + 增强 2 个 Skill(v1.1.0)
新增:
- gitlink-contributor-insight: 贡献者活跃度分析(user +heatmap/stats/trends)
- gitlink-ci-health: CI 健康巡检(ci +authorize/builds/logs)
- gitlink-notification-digest: 通知摘要(notification +list/read/read-all)

增强(v1.1.0):
- gitlink-issue-triage: 新增 issue +journals 活动日志分析 + series-update 批量操作
- gitlink-research-tracker: 新增 search +code/+issues 多维度搜索

基于子任务一的新命令开发。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 10:15:08 +08:00
lindiwen23 431545c633 Merge pull request 'fix: Skills 文件 api 命令替换为 Shortcut 命令 (~107 处)' (#9) from dw into master 2026-06-03 09:39:37 +08:00
林迪文 d50b3c7364 fix: Skills 文件 api 命令替换为 Shortcut 命令 (~107 处)
将 skills/ 目录下 21 个文件中的 gitlink-cli api <METHOD> <PATH> 命令
替换为对应的 Shortcut 命令,修复因 Token 注入不完整导致的 HTML 响应问题。

主要替换:
- api GET /:owner/:repo/languages → repo +languages
- api GET /:owner/:repo/sub_entries → repo +files
- api GET /:owner/:repo/raw/... → repo +raw
- api POST /:owner/:repo/create_file → repo +create-file
- api POST /:owner/:repo/pulls/:id/reviews → pr +review
- api GET /:owner/:repo/pulls/:id → pr +view
- 等共 107 处替换

注: 6 处 pm 域命令暂留(pm 模块尚未构建)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 09:39:48 +08:00
林迪文 b748a95511 feat: 新建 notification 模块并注册
- notification +list: 列出通知(支持已读/参与过滤)
- notification +read: 标记单条通知为已读
- notification +read-all: 标记所有通知为已读
- register.go: 添加 notification 模块的 import、groups、descriptions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 09:19:18 +08:00
lindiwen23 e9c4b5b0aa Merge pull request 'feat: 新建 notification 模块并注册' (#8) from dw into master 2026-06-03 09:19:02 +08:00
林迪文 0017147cbd feat: org +teams/+create-team/+remove-user, search +code/+issues
- org +teams: 列出组织下的所有团队
- org +create-team: 在组织下创建新团队
- org +remove-user: 从组织中移除成员
- search +code: 在仓库中搜索代码
- search +issues: 搜索 Issue(支持状态/标签/作者过滤)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 09:14:57 +08:00
lindiwen23 b8952a8838 Merge pull request 'feat: org +teams/+create-team/+remove-user, search +code/+issues' (#7) from dw into master 2026-06-03 09:14:46 +08:00
lindiwen23 20bcdad4ba Merge pull request 'fix: detectHTMLResponse 跳过 XML 声明,添加 HTML 响应检测' (#6) from dw into master 2026-06-03 09:02:02 +08:00
林迪文 691961072a feat: issue +journals/+series-update, ci +activate/+deactivate/+authorize
- issue +journals: 查看 Issue 活动日志
- issue +series-update: 批量更新 Issue 状态
- ci +activate: 激活 CI/CD
- ci +deactivate: 停用 CI/CD
- ci +authorize: 检查 CI/CD 授权状态

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 09:02:06 +08:00
林迪文 9b08029643 merge: resolve client.go conflict, keep XML declaration fix 2026-06-03 08:58:40 +08:00
蒋天翔 015789c092 feat: add heatmap, stats, trends shortcuts to user module
- heatmap: show user contribution heatmap with optional --year flag
- stats: show user development statistics with optional --start-time/--end-time
- trends: show user project trends
- includes 11 new unit tests covering normal paths, parameter validation, and HTTP error handling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:41:47 +08:00
蒋天翔 afed2c9b7e feat: add pr commits/branches/check-merge shortcuts with tests
Add three new shortcuts to the pr module:
- commits: list commits in a pull request (v1 API)
- branches: list branches for PR creation
- check-merge: check if two branches can be merged

Each shortcut includes unit tests covering both success and HTTP error paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:41:39 +08:00
蒋天翔 89ce8b4052 feat: add repo languages/contributors/files/tags/commits shortcuts with tests
Add 5 new repo shortcuts:
- languages: show language breakdown
- contributors: list contributors with pagination
- files: list directory contents with ref/path filters
- tags: list tags with pagination
- commits: list commits with sha/path filters

Include 13 unit tests covering normal paths and HTTP error paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:41:31 +08:00
林迪文 044e736a1b fix: detectHTMLResponse 跳过 XML 声明,添加 HTML 响应检测
- 在 json.Unmarshal 之前检测 HTML 响应
- detectHTMLResponse 先 strip <?xml...?> 声明再检查 HTML 前缀
- 返回中文诊断提示替代原始 JSON parse error
- 修复 Code Review: TestDetectHTMLResponse/XML_声明后跟_HTML

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 08:33:52 +08:00
林迪文 64ccd0466a Merge remote-tracking branch 'upstream/master' 2026-06-03 08:27:51 +08:00
jiangtx 46311f1b4d Merge pull request 'label 模块新建' (#5) from jtx_branch into master 2026-06-03 00:26:59 +08:00
蒋天翔 70476a3a2a feat: add heatmap, stats, trends shortcuts to user module
- heatmap: show user contribution heatmap with optional --year flag
- stats: show user development statistics with optional --start-time/--end-time
- trends: show user project trends
- includes 11 new unit tests covering normal paths, parameter validation, and HTTP error handling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 00:21:02 +08:00
jiangtx e10d56810d Merge pull request 'pr 域补全' (#4) from jtx_branch into master 2026-06-03 00:11:15 +08:00
蒋天翔 fd2517f2f8 feat: add pr commits/branches/check-merge shortcuts with tests
Add three new shortcuts to the pr module:
- commits: list commits in a pull request (v1 API)
- branches: list branches for PR creation
- check-merge: check if two branches can be merged

Each shortcut includes unit tests covering both success and HTTP error paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 23:47:59 +08:00
jiangtx 9e7eb94658 Merge pull request 'repo 域补全' (#3) from jtx_branch into master 2026-06-02 23:29:15 +08:00
wbtiger c7a3224c79 Merge pull request 'feat(skills): 新增许可证合规检查的skill : gitlink-license-compliance' (#94) from yangsai/gitlink-cli:feat/gitlink-license-compliance into master 2026-06-02 23:07:48 +08:00