fix(home): format close/approve PR activity display when comment is empty #166

Merged
fuzzy merged 1 commit from fix/activity-types into main 2026-07-07 05:30:55 +00:00
Owner

What

Fix home panel display for close_pull_request, approve_pull_request, and reopen_pull_request activity events. Added opTypeLabel entries and activityColor entries for these types.

Why

These op types exist in the Gitea/Forgejo API but were unhandled in formatDesc, showing raw JSON like ["163",""] instead of PR #163 closed.

Testing

  • go build ./... passes
  • All pre-commit hooks pass

Breaking Changes

None

Notes

Follow-up to #164 which fixed the same pattern for issue events.

## What Fix home panel display for `close_pull_request`, `approve_pull_request`, and `reopen_pull_request` activity events. Added opTypeLabel entries and activityColor entries for these types. ## Why These op types exist in the Gitea/Forgejo API but were unhandled in `formatDesc`, showing raw JSON like `["163",""]` instead of `PR #163 closed`. ## Testing - [x] `go build ./...` passes - [x] All pre-commit hooks pass ## Breaking Changes None ## Notes Follow-up to #164 which fixed the same pattern for issue events.
fix(home): format close/approve PR display when comment is empty
All checks were successful
Test and Release / test (pull_request) Successful in 2m49s
Test and Release / lint (pull_request) Successful in 3m32s
7272d3cfdd
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-07 05:27:33 +00:00
the.auditor left a comment

Review

Result: Approved — no blocking issues.

Summary: Extends PR activity display for close/approve/reopen events, following the same pattern established in #164. Adds opTypeLabel icons, activityColor grouping, and empty-comment fallbacks.

Notable: Existing create_pr/merge_pr with empty comment now shows #42 instead of #42 → (improvement, not regression).

Discussion: close_pull_request uses ColorLightBlue (grouped with other PR events) while close_issue uses ColorRed. Intentional design choice — consistent PR grouping in activity feed.

Testability concern already tracked in #165.

## Review **Result: Approved** — no blocking issues. **Summary:** Extends PR activity display for close/approve/reopen events, following the same pattern established in #164. Adds opTypeLabel icons, activityColor grouping, and empty-comment fallbacks. **Notable:** Existing `create_pr`/`merge_pr` with empty comment now shows `#42` instead of `#42 → ` (improvement, not regression). **Discussion:** `close_pull_request` uses `ColorLightBlue` (grouped with other PR events) while `close_issue` uses `ColorRed`. Intentional design choice — consistent PR grouping in activity feed. Testability concern already tracked in #165.
fuzzy merged commit 7272d3cfdd into main 2026-07-07 05:30:55 +00:00
fuzzy deleted branch fix/activity-types 2026-07-07 05:30:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
thwap/steeper!166
No description provided.