基础设施修复 #97

Open
jiangtx wants to merge 51 commits from jiangtx/gitlink-cli:jtx_branch into master
First-time contributor

基础设施修复

基础设施修复
jiangtx added 4 commits 2026-06-02 16:54:24 +08:00
548141e2f1 feat: 新增 3 个 Skill(onboarding / issue-triage / research-tracker),收窄 gitlink-search 触发范围
- gitlink-onboarding: 新人入门引导,帮助新贡献者发现适合入门的 Issue
- gitlink-issue-triage: Issue 智能分拣,按类型/紧急度/复杂度分类并生成分拣报告
- gitlink-research-tracker: 技术调研报告生成,多关键词搜索+深度评估+成熟度评分
- gitlink-search: 收窄描述避免与 research-tracker 触发冲突

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aa0a623a73 feat: 添加 Raw API HTML 响应自动检测与诊断提示
当 GitLink API 返回 HTML 页面(如登录页)而非 JSON 数据时,
自动识别并返回结构化错误信息,包含可能原因和修复建议。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9ea0dc71b9 ci: 更新 CI 配置支持 Go 1.26.1 和建木流水线
- Gitea Actions: 更新 Go 版本为 1.26.1 以匹配 go.mod
- 建木流水线: 新增 .devops/ci.yml,push 到 jtx_branch 自动触发

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
jiangtx added 1 commit 2026-06-02 17:18:11 +08:00
9106be35d4 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>
jiangtx added 1 commit 2026-06-02 23:47:49 +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>
jiangtx added 1 commit 2026-06-03 00:24:18 +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>
jiangtx added 1 commit 2026-06-03 08:13:13 +08:00
ad906e212c fix: handle XML declaration in detectHTMLResponse and remove .devops/ci.yml
- Strip <?xml...?> declaration before checking HTML prefixes
- Remove .devops/ci.yml containing personal DevCloud config

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
jiangtx added 2 commits 2026-06-03 20:44:58 +08:00
0fd9d0f6d7 feat: 添加 Dockerfile 和建木 DevOps 流水线配置
- 多阶段 Docker 构建(golang:1.26-alpine + alpine:3.20)
- 流水线:push 到 master 自动测试、构建、部署到 ECS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
7e7e2ccb47 feat: 添加通知管理、标签克隆、仓库文件操作等 8 项功能
新增功能:
- notification: list/read/read-all/watch 快捷命令
- repo: raw/activity/compare/create-file/update-file 快捷命令
- label: clone 快捷命令(从其他仓库克隆标签)
- alias: +list/+set/+delete/+expand 子命令

修复:
- auth.go: 修复 Windows 下 syscall.Stdin 类型兼容问题
- register_test: 更新分组计数以包含 notify

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
jiangtx added 74 commits 2026-07-07 09:09:58 +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>
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>
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>
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>
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>
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>
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>
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>
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
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
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
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
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
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
028a2f1cab feat: 添加 Dockerfile 和建木 DevOps 流水线配置
- 多阶段 Docker 构建(golang:1.26-alpine + alpine:3.20)
- 流水线:push 到 master 自动测试、构建、部署到 ECS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
044551dbc8 fix: remove -race flag and fix shell chain logic in CI pipeline
-race requires CGO/gcc not available in Alpine. Parenthesized || true
to prevent chain logic interference.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
298c29795e feat: merge jtx_branch unique commands into master
- ci: add activate, deactivate, authorize commands; fix indentation
- org: add teams, create-team, remove-user commands; fix indentation
- search: add code, issues commands; fix indentation and cleanup
- repo: add raw, activity, compare, create-file, update-file commands
- notification: add watch command
- label: add clone command
- register_test: fix expected group count

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
da95900b83 chore: trigger pipeline with updated CI config
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49c0fc9194 ci: 配置 master 分支的 CI 检查和构建验证两条流水线
- 更新 .devops/ci.yml: master 合并后自动执行编译/静态分析/测试/格式化检查
- 新增 .devops/build.yml: master 合并后编译二进制并验证所有新命令注册成功
a8e67fc32e feat: add repo +delete-file shortcut and convert Skills from raw API to shortcut commands
- Add repo +delete-file shortcut command in shortcuts/repo/repo.go
- Add comprehensive unit tests for create-file, update-file, delete-file
  (15 new test cases covering happy paths, optional params, missing args,
  and HTTP error handling)
- Update gitlink-notification-digest Skill to v3.0.0 using notification
  +list/+read/+read-all/+watch shortcuts
- Update gitlink-pm Skill to v1.1.0 using pm +dashboards/+sprints/+weekly
  shortcuts
- Fix gitlink-shared/SKILL.md Raw API example (user +me → api GET /users/me)
- Update api-reference.md examples to use notification shortcuts
- Update gitlink-contributor-insight examples to reflect current
  command availability
- Update CI config branch from wyx_branch to master

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fad02b9f66 fix: 修复 gofmt 格式化问题
- 所有文件从 CRLF 转为 LF 换行
- issue.go: 修正 journals/series-update 条目缩进
- register_test.go: 修正 expectedGroups 缩进
- ci.yml: 恢复格式化检查模式
0eb37dc2de style: gofmt 格式化修正(import 排序 + 对齐)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9a493914de feat(skills): 新增4个编排型Skill(子任务三端到端自动化工作流)
- gitlink-community-ops: 社区运营自动化(Issue分类→周报→Release)
- gitlink-project-bootstrap: 项目一键初始化
- gitlink-multi-repo-ops: 多仓库协同
- gitlink-contributor-growth: 贡献者成长体系(排行+徽章)

每个Skill编排多个已有子Skill,串联≥6个CLI命令,含Mermaid流程图与Agent触发示例。
51026af669 feat(skills): 新增gitlink-pr-gate编排型Skill(场景②代码质量看门人)
PR提交 → AI代码审查 → CI检查 → 结构化Review评论 → 质量达标自动合并
编排 code-review/commit-quality/ci-health/pr 四个子Skill,串联8+命令。
统一采用编排型Skill方式实现,与前4个场景一致。
87767f5482 feat: P0 新增 show/demo/--web/--demo 命令与离线演示能力
- internal/web: URL Builder (16 模式) + 跨平台浏览器(单一 URL 来源)
- cmd/show: 12 子命令打印 GitLink 网页 URL(投影友好 + --format json)
- cmd/demo: +run showcase 离线演示脚本(自动 GITLINK_DEMO=1)
- internal/demo: Mock Transport + 20 fixtures + --demo flag(无网无 Token)
- shortcuts/common/web_post.go: --web 全局后处理(命令执行后打开网页)
- shortcuts/capability: +check 支持 --format 结构化输出
- scripts/verify.sh: 7 段分段验证脚本(编译/覆盖率/注册/E2E/联动)
- doc/: 验证报告 + 演示脚本 + 设计文档
- .gitignore: 排除验证临时产物与课程材料
2019da5eb5 chore: 停止跟踪 gitlink-cli 二进制构建产物
gitlink-cli / gitlink-cli.exe 是 go build 的本地产出,不应入库。
- 加入 .gitignore(/ 前缀精确匹配根目录)
- git rm --cached 停止跟踪(保留本地文件)
- 后续分发走 Release 附件

历史中的旧版本 blob 仍保留(不影响已发布的 commit),仅停止后续跟踪。
3dbcef1b34 Merge origin/master into jtx_branch
冲突解决策略:9 个冲突文件均以 master 为准(master 的 shortcut 集是
jtx_branch 的超集——notification/pm/export/wiki/capability 等已独立实现
且更完整,含 P0 show/demo/--web/--demo + i18n + 覆盖率门禁)。

jtx_branch 的独有贡献(master 没有的)通过 merge 自动合入:
- shortcuts/notification/notification_test.go

冲突文件(全选 master 版本):
.devops/ci.yml(jtx_branch 删 / master 加覆盖率门禁 → 保留 master)
.devops/gitlink-cli.yml, cmd/{alias,auth,root}.go, internal/client/client.go,
shortcuts/{register,register_test,repo/repo}.go
This pull request has changes conflicting with the target branch.
  • .github/workflows/test.yml
  • .gitignore
  • Dockerfile
  • Makefile
  • cmd/auth/auth_test.go
  • gitlink-web/README.md
  • internal/auth/token_store.go
  • internal/auth/token_store_test.go
  • shortcuts/ci/ci.go
  • shortcuts/issue/issue.go
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b jiangtx-jtx_branch master
git pull jtx_branch

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff jiangtx-jtx_branch
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#97
No description provided.