When a wiki page is deleted, also remove _Sidebar.md so that GitLink
regenerates it from the current file list on next web visit. This
prevents orphaned page references from accumulating in the sidebar.
Use git add -A to safely stage all changes (deleted page + sidebar)
without failing when _Sidebar.md doesn't exist.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Modifying _Sidebar.md causes wiki page rendering to break on the
web UI. Delete now only removes the .md file and leaves sidebar
management to GitLink's web interface.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add safe sidebar cleanup using a separate helper file (sidebar.go)
to avoid encoding issues. Only removes the page reference, never
adds or modifies other content.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite tests to use local Git repositories for list/view (Git-based)
and HTTP test servers for create/delete (API-based). Add
repoGitURLOverride variable for test isolation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Snippet list and view now clone the repo (read-only) instead of
using broken API endpoints. Delete auto-fetches file SHA via
git hash-object for proper API verification.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Automatic sidebar updates caused wiki rendering issues on the web UI.
The sidebar is best left managed by GitLink's web interface directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When creating a wiki page, add [[PageName]] to _Sidebar.md.
When deleting a wiki page, remove [[PageName]] from _Sidebar.md.
This ensures the web UI properly reflects page changes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Store snippets as files in the snippets/ directory of the repository
using the repo file API. Supports language tagging in content format
and branch selection for commits.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement a kanban-style project board shortcut group that groups
issues by status. Supports filtering by state and milestone, moving
issues between columns with English or Chinese status names.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace REST API-based wiki implementation with direct Git operations
on the wiki repository (https://gitlink.org.cn/{owner}/{repo}.wiki.git).
This fixes wiki management which was broken due to REST API limitations.
List and view work without authentication (public repo).
Create, update, delete require a Personal Access Token for Git push.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement wiki management shortcuts with full CRUD operations.
Includes comprehensive unit tests covering success paths, error
handling, partial updates, project ID auto-resolution, and
parameter validation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The API returns both "id" (global database PK) and "project_issues_index"
(per-project sequential number). The +list JSON output was a raw API
pass-through, making the database ID the most prominent identifier.
This change normalizes each issue in the list:
- Add "number" field from project_issues_index (matches the web URL)
- Rename "id" to "database_id" to prevent confusion
The "number" field now matches the --number flag used by +view, +close,
+update, and +comment commands.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
List all 9 contributors by PR count (desc), showing avatars and
GitLink IDs, placed before "Why gitlink-cli" section.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Use v1 API paths for all webhook endpoints (fixes view/test returning HTML/404)
- Add +tasks command for listing webhook delivery tasks
- Add webhook event validation (10-event whitelist)
- Add webhook type validation (10-type whitelist)
- Add content-type and http-method validation
- Fix update to preserve unspecified fields via fetch-and-merge
- Add event deduplication in parseWebhookEvents
- Add 9 comprehensive unit tests (up from 3)
- Use --http-method flag (maintains backward compatibility with PR #20)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>