Commit Graph

32 Commits

Author SHA1 Message Date
wbtiger d5e15c6e71 ci: add GitHub Release workflow with npm publish 2026-05-17 14:49:16 +08:00
wbtiger 795d00302e Revert "Add TUI foundation (Phase 1: Harness Foundation)"
This reverts commit 0ae44e9a64.
2026-05-17 14:14:32 +08:00
wbtiger 0ae44e9a64 Add TUI foundation (Phase 1: Harness Foundation)
Core architecture:
- tui/app.go: Root Bubble Tea model with view routing, layout engine,
  global keybindings (Ctrl+A/Ctrl+Space/Ctrl+P/?), AI panel toggle
- tui/store/store.go: Central state store with auth detection and
  project context resolution (reuses gitlink-cli internal packages)
- tui/navigation/router.go: Stack-based view navigation for back support
- tui/ui/: Theme, keymap, styles, StatusBar, TabBar components
- tui/views/home.go: Dashboard view with onboarding wizard for first run
- main.go: TUI mode dispatch via "gitlink-cli tui"

Entry point: gitlink-cli tui

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 14:08:10 +08:00
wbtiger f8d9935b98 docs: remove Gitea reference from branch skill 2026-05-17 12:35:34 +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 a3b710268e feat(skills): add gitlink-branch Skill
- 从 gitlink-repo/references/ 提取 branch 命令,整合为独立 Skill
- 覆盖 branch +list/+create/+delete/+protect 四个命令
- 含 examples/branch-workflow.md 端到端工作流
- 更新 skills/README.md 表格补上 branch +delete
2026-05-17 12:03:34 +08:00
wbtiger a560dfc982 Merge pull request 'feat(pr): add pr +comment shortcut' (#15) from wbtiger/gitlink-cli:feat/pr-comment into master 2026-05-14 14:26:26 +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
wbtiger 800002d710 Merge pull request 'feat(issue): add batch close shortcut with dry-run support' (#12) from wangyue111/gitlink-cli:feat/issue-batch-close into master 2026-05-13 19:27:01 +08:00
wangyue789 b2e840f498 feat(issue): add batch close shortcut with dry-run support 2026-05-13 17:27:50 +08:00
wbtiger b49cf8ffda Merge pull request 'fix: Issue 操作切换到 v1 API,统一使用 project_issues_index 替代数据库 ID' (#11) from wbtiger/gitlink-cli:fix/issue-use-v1-index into master 2026-05-12 17:06:29 +08:00
wbtiger 3e1abd8b8a docs: 补充 Issue status_id 映射表(1=新增, 2=正在解决, 3=已解决, 5=关闭) 2026-05-12 17:05:28 +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
wbtiger 00f72bccf7 fix pull request number issue 2026-05-12 14:28:30 +08:00
wbtiger 17abc488a8 fix: 统一使用 pull_request_number 替代 pull_request_id
将所有 skill 文档中对 pull_request_id 的引用替换为 pull_request_number,
与用户在网页 URL (/pulls/N) 中看到的序号一致。API 本身支持
pull_request_number,因此无需任何代码改动。

Fixes #7
2026-05-12 14:07:20 +08:00
wbtiger b446ae419c Merge pull request 'fix: preserve issue description on updates' (#7) from topshare/gitlink-cli:fix/issue-description-preserve into master 2026-05-12 11:44:14 +08:00
Zhang Jinnan 46aa383d76 fix: preserve issue description on updates 2026-04-28 08:43:51 +08:00
wbavon 7516ea8de9
Merge pull request #4 from ccfos/docs/fork-based-pr-workflow
docs(skills): add Fork-based PR workflow guidelines
2026-04-18 17:13:56 +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
wbavon c2cc921908
Merge pull request #3 from ccfos/fix/skill-tool-boundary
fix(skills): add tool boundary rules to prevent gh/hub misuse on GitLink
2026-04-18 16:21:46 +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
wbavon 61d7e2577a
Merge pull request #2 from wbavon/docs/license-mulanpsl2
docs: update license references from Apache 2.0 to MulanPSL-2.0
2026-04-17 11:46:15 +08:00
wbtiger 46c2b0353b docs: update license from Apache 2.0 to MulanPSL-2.0
- Update badge, description, and footer link in README.md
- Update badge, description, and footer link in README.zh-CN.md
- License URL: https://license.coscl.org.cn/MulanPSL2
2026-04-17 11:44:08 +08:00
wbavon 96c14dce97
Merge pull request #1 from /docs/i18n-readme-en-zh
docs: translate README to English, add Chinese README.zh-CN.md
2026-04-17 11:27:15 +08:00
wbavon 147033c73a
change license to mulan 2026-04-17 11:25:01 +08:00
wbtiger 6b656852c5 docs: translate README to English, add Chinese README.zh-CN.md
- Convert README.md to full English version
- Add README.zh-CN.md as the Chinese translation
- Add cross-links between the two versions
- Clean up mixed-language content in both files
- No content changes, translation only
2026-04-17 10:58:21 +08:00
wbavon adfa5b6141
remove test log
Removed outdated project links and updated document names.
2026-04-17 10:13:11 +08:00
wbavon d484ef1449
remove test log 2026-04-17 10:08:13 +08:00
wbtiger 5adbe4b111 delete test log 2026-04-17 10:07:03 +08:00
wbavon 91547de16b
add npx 2026-04-17 10:03:50 +08:00
wbtiger e892370de8 init gitlink-cli 2026-04-17 10:01:30 +08:00