Commit Graph

8 Commits

Author SHA1 Message Date
蒋天翔 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>
2026-06-04 11:34:08 +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
林迪文 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
Zhang Jinnan 46aa383d76 fix: preserve issue description on updates 2026-04-28 08:43:51 +08:00
wbtiger 2aad9a00d4 fix: require Fork even for admin/owner, unless user explicitly says otherwise 2026-04-18 17:07:32 +08:00
wbtiger 445e548f49 docs(skills): add Fork-based PR workflow guidelines
- gitlink-shared: add 'PR Collaboration Workflow' section with Fork flow,
  correct/incorrect examples, and self-owned repo exception
- gitlink-pr: replace single-path PR creation with two sections:
  1. Fork flow for contributing to others' repos (mandatory)
  2. Direct branch flow for self-owned repos (allowed)

Ensures AI agents follow standard open-source collaboration practices
instead of pushing branches directly to upstream repositories.
2026-04-18 16:56:55 +08:00
wbtiger 90dee6eeb5 fix(skills): add tool boundary rules to prevent gh/hub misuse on GitLink
Problem:
AI agents (e.g., Claude Code) sometimes use `gh` (GitHub CLI) instead of
`gitlink-cli` when operating on GitLink repositories, causing 'command not
found' errors or targeting the wrong platform.

Solution:
- Add ' Tool Boundary' section to gitlink-shared/SKILL.md with platform-
  to-tool mapping table, judgment criteria, and dual-platform guidance
- Add CRITICAL one-liner to all 10 sub-skills ensuring agents see the
  constraint even without reading shared
- Does NOT block `gh` for GitHub operations — only prevents misuse on
  GitLink resources

Tested with 5 scenarios confirming:
1. GitLink operations correctly use gitlink-cli
2. GitHub operations still use gh when appropriate
3. Ambiguous cases default to gitlink-cli when skill is loaded
2026-04-18 16:14:20 +08:00
wbtiger e892370de8 init gitlink-cli 2026-04-17 10:01:30 +08:00