forge issue view and pr view: print created, updated, closed, and merged timestamps #204
No reviewers
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools!204
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/forge-view-timestamps"
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?
forge issue viewandforge pr viewnow print when an item was created and last updated, plus when it was closed and, for pull requests, whether and when it was merged.forge pr snapshotcarries the same facts as JSON fields. Nothing else inforgechanges: the header labels are realigned into one column and every other line, the body, and the comment blocks are byte-identical. The proof is the exact-output tests for open, closed, and merged items and the snapshot rejection cases; the machines that runforgeare unaffected until theirallod-toolspin moves. If a date reads wrong, revert this one commit pair; no state is written anywhere.What changes
issue view:Created:andUpdated:afterAuthor:, andClosed:when the issue is closed. Dates are the first ten characters of the API timestamp, theYYYY-MM-DDform the comment lines already use.pr view: the same three lines, thenMerged: yes YYYY-MM-DDorMerged: no, printed only for a closed pull request. Thepr viewlabel column widens from 8 to 10 characters soCreated:fits;issue viewalready had room.pr snapshot:pull_requestgainsstate,created_at,updated_at,closed_at(null until closed),merged, andmerged_at(null until merged), carrying the API's full RFC 3339 timestamps.schema_versionstays 1: the change is additive and the one consumer,pr-explain, validates named fields and ignores extra keys. The snapshot fails closed on a malformed timestamp, astateother thanopenorclosed,mergeddisagreeing withmerged_at,closed_aton an open PR, ormergedon a PR that is not closed.null, the same stand-in every other missing header field already prints.Risk
R1. Read-only output formatting and an additive JSON schema. Worst credible failure after the tests pass is a script that pinned
pr view's old two-space label alignment;pr viewoutput was never a documented interface andpr snapshotis the machine-readable one. Rollback is a revert.Validation
gofmt -l .empty;go vetandgo test ./...green untagged and withsite,secret, andsite,secret, run by the overseer in the branch worktree after the final commit.Closes allod/tools#194