1.7 KiB
1.7 KiB
Issue journal shortcuts
Background
Issue comments and journal events are useful for stale issue detection, audit
trails, and triage workflows. Those reads were still documented as Raw API calls
against /v1/:owner/:repo/issues/:number/journals.
This change adds first-class read-only shortcuts for issue journals.
New shortcuts
issue +journalslists raw issue journal records.issue +activityuses the same journal endpoint as an activity-oriented alias.
Both commands preserve the existing issue number convention:
--number/-nis the preferred web-visible issue number.--id/-iremains a compatibility alias for the same web-visible number, not the database ID.
Options
--categoryfilters journal category, for examplecomment.--pagedefaults to1.--limitdefaults to50.
Examples
gitlink-cli issue +journals --owner Gitlink --repo forgeplus --number 123 --page 1 --limit 50
gitlink-cli issue +journals --owner Gitlink --repo forgeplus --number 123 --category comment
gitlink-cli issue +activity --owner Gitlink --repo forgeplus --number 123 --category comment
Documentation updates
- README and README.zh-CN include journal and activity examples.
skills/gitlink-issuedocuments the new read-only shortcuts.skills/gitlink-stale-issue-managernow usesissue +journalsinstead of Raw API for comment history lookup.
Tests
Unit tests cover:
- endpoint path and query mapping;
--numberand--idalias behavior;- missing issue number validation;
- HTTP error propagation.
Suggested verification:
go test ./shortcuts/issue ./shortcuts
Full project verification:
go test ./...