fix(timeline): gitea_issue_timeline omits label names, title changes and milestone/assignee payloads #34

Closed
opened 2026-10-24 00:59:24 +00:00 by dsh · 1 comment
Owner

Symptom

gitea_issue_timeline lists event types but drops the payload: label events show no label name, title changes show neither old nor new title, milestone events show no milestone, and assignee events show no user. The feed cannot be used to reconstruct what happened to an issue.

Repro

gitea_issue_timeline {owner:"ml-lab", repo:"tardits", number:2, limit:20}
→ [milestone] by dsh:
  [label] by dsh: 1
  [label] by dsh: 1
  [label] by dsh: 1
  [label] by dsh: 1
  [assignees] by dsh:
  [comment] by dsh: QA probe comment — will be deleted.
  [change_title] by dsh:
  [label] by dsh:
  ...

The same events in the web UI show label names (type/task, area/dsh, …), the title change, and the milestone title.

Observed vs expected

  • Observed: only ev.body / ev.comment.body is rendered; label/milestone/title/assignee payloads are ignored (and reaction bodies render as 1).
  • Expected: per-type rendering, e.g. [label] added type/task, [change_title] old → new, [milestone] QA probe milestone, [assignees] added @dsh.

Root cause

lib/handlers/formatters.js:

const summary = data.map((ev) =>
  `[${ev.type || 'event'}] by ${ev.user_login || ev.user?.login || 'system'}: ${ev.body || ev.comment?.body || ''}`.trim()
)

Only body/comment.body is considered; Forgejo timeline rows carry label.name, old_title/new_title, milestone.title, assignee, etc.

Proposed fix

Add per-event-type rendering with a fallback to the current format; add created_at (already available) and tests for label/change_title/milestone/assignee/comment/reaction events.

Acceptance: the Repro shows label names, the title change and the milestone, without empty trailing colons.

Duplicate check

Searched timeline (state all) — no existing issue.

Layer

dsh-gitea plugin/tool (formatter).

## Symptom `gitea_issue_timeline` lists event types but drops the payload: label events show no label name, title changes show neither old nor new title, milestone events show no milestone, and assignee events show no user. The feed cannot be used to reconstruct what happened to an issue. ## Repro ``` gitea_issue_timeline {owner:"ml-lab", repo:"tardits", number:2, limit:20} → [milestone] by dsh: [label] by dsh: 1 [label] by dsh: 1 [label] by dsh: 1 [label] by dsh: 1 [assignees] by dsh: [comment] by dsh: QA probe comment — will be deleted. [change_title] by dsh: [label] by dsh: ... ``` The same events in the web UI show label names (`type/task`, `area/dsh`, …), the title change, and the milestone title. ## Observed vs expected - Observed: only `ev.body` / `ev.comment.body` is rendered; label/milestone/title/assignee payloads are ignored (and reaction bodies render as `1`). - Expected: per-type rendering, e.g. `[label] added type/task`, `[change_title] old → new`, `[milestone] QA probe milestone`, `[assignees] added @dsh`. ## Root cause `lib/handlers/formatters.js`: ```js const summary = data.map((ev) => `[${ev.type || 'event'}] by ${ev.user_login || ev.user?.login || 'system'}: ${ev.body || ev.comment?.body || ''}`.trim() ) ``` Only `body`/`comment.body` is considered; Forgejo timeline rows carry `label.name`, `old_title`/`new_title`, `milestone.title`, `assignee`, etc. ## Proposed fix Add per-event-type rendering with a fallback to the current format; add `created_at` (already available) and tests for label/change_title/milestone/assignee/comment/reaction events. Acceptance: the Repro shows label names, the title change and the milestone, without empty trailing colons. ## Duplicate check Searched `timeline` (state all) — no existing issue. ## Layer dsh-gitea plugin/tool (formatter).
Author
Owner

Fixed in 56f41de (PR #41).

The timeline formatter now renders per event type: added type/task (label), Old → New (change_title), milestone title, added @dsh (assignees), comment body, reaction, plus the timestamp. label, old_title, new_title, removed_label, removed_assignee and reaction were added to RECORD_KEYS.

Live on ml-lab/tardits #2: labels, assignee, title change and close events all show their payloads.

Tests: test/qa-formatters.test.mjs.

Fixed in `56f41de` (PR #41). The timeline formatter now renders per event type: `added type/task` (label), `Old → New` (change_title), milestone title, `added @dsh` (assignees), comment body, reaction, plus the timestamp. `label`, `old_title`, `new_title`, `removed_label`, `removed_assignee` and `reaction` were added to `RECORD_KEYS`. Live on `ml-lab/tardits` #2: labels, assignee, title change and close events all show their payloads. Tests: `test/qa-formatters.test.mjs`.
dsh closed this issue 2026-10-24 01:25:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dsh-plugins/dsh-gitea#34
No description provided.