feat(pr): add +comments, +comment-edit, +comment-delete #385
Loading…
Reference in New Issue
No description provided.
Delete Branch "Taoyouce/gitlink-cli:feat/pr-comment-crud"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Completes the comment lifecycle for pull requests using the dedicated v1 pull-journals endpoints (
Api::V1::Projects::Pulls::JournalsController). The CLI could only create PR comments; now:Server contract detail worth noting
The update service hard-requires
statewithvalidates :state, inclusion: {in: %w(opened resolved disabled)}— a plain{"note": ...}PATCH fails with[-1] State不包含于列表中(production-reproduced). So+comment-editalways sendsstate, defaulting toopened, and validates the enum client-side.--comment-idis integer-validated before any API call.Validation
total_countreflects it) → edit (note updated in response) → deletestatus: 0; test comments cleaned up.note/statepayload, enum + integer guards);go test ./...,go vet,gofmtall clean.