Lighten ProjectView by hiding closed PRs and allow pinning refs forever #49

Closed
opened 2026-10-30 14:26:26 +00:00 by Gilles · 0 comments
Owner

Closed PR reports stay in the main project listing until cleanup_pr() deletes them after retention_days, cluttering ProjectView. Also, there is no way to exempt a specific ref (e.g. a release build) from cleanup_pr/prune_history.

Backend scope:

  • apps.reports.pr_state: cache a PR's open/closed state (Forgejo lookup), set to closed immediately from the webhook.
  • ReportListUploadView annotates each PR-scoped report with pr_state.
  • New PinnedRef model: marks a (project, ref_kind, ref_value) as kept forever, exempting it from cleanup_pr/prune_history.
  • New GET/POST/DELETE .../refs/{ref_kind}/{ref_value}/pin/ and GET .../pinned-refs/ endpoints.
Closed PR reports stay in the main project listing until cleanup_pr() deletes them after retention_days, cluttering ProjectView. Also, there is no way to exempt a specific ref (e.g. a release build) from cleanup_pr/prune_history. Backend scope: - apps.reports.pr_state: cache a PR's open/closed state (Forgejo lookup), set to closed immediately from the webhook. - ReportListUploadView annotates each PR-scoped report with pr_state. - New PinnedRef model: marks a (project, ref_kind, ref_value) as kept forever, exempting it from cleanup_pr/prune_history. - New GET/POST/DELETE .../refs/{ref_kind}/{ref_value}/pin/ and GET .../pinned-refs/ endpoints.
Sign in to join this conversation.
No description provided.