Commit Graph

13 Commits

Author SHA1 Message Date
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
wangyue789 00c753b421 feat(pr): add reopen shortcut 2026-05-27 01:08:54 +08:00
wbtiger 898b7f59d1 feat: add milestone, compare, pr reopen shortcuts and api enhancements (#45)
- milestone shortcuts: list, create, view, update, delete, close, reopen
- compare shortcuts: view, files (compare branches/tags/commits)
- pr +reopen: reopen closed pull requests
- api: add --body-file and --body-stdin for reading JSON from file/stdin
- comprehensive tests for all new shortcuts

Co-authored-by: wangyue111 <wangyue111>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 00:44:39 +08:00
Tiger 49cd590227 Merge PR #26: feat(pr): add review shortcuts
Resolved conflicts between PR #24 (+versions, +version-diff) and PR #26
(+reviews, +review). Unified prReviewsPath() to use existing prV1Path() helper.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 22:12:01 +08:00
wangyue789 fbea42ecce feat(pr): add review shortcuts 2026-05-21 17:20:15 +08:00
wangyue789 e85dd367d8 feat(pr): add patchset version shortcuts 2026-05-21 11:58:47 +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 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
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