feat(/bounty): add pagination, sorting, and filtering #62

Merged
shoko merged 1 commits from fix/issue-48-bounty-pagination into main 2026-04-04 10:09:30 +02:00
Owner

Summary

Implements pagination, sorting, and filtering for the /bounty command.

Changes

Pagination

  • Default: 5 bounties per page
  • /bounty 10 - show 10 bounties
  • /bounty all - show all active (exclude overdue >24h)
  • /bounty all 10 - show 10 including expired

Filtering

  • Overdue >24h filtered out by default
  • all flag includes overdue bounties

Sorting

  • Bounties with due date: sorted by due_date_ts (earliest first)
  • Bounties without due date: shown last, sorted by created_at

Output Format

Showing 5 of 12 bounties:
[#1] Sliced description... | 🔗 link | ⏰ 4 Apr 2026 (2d)
[#2] Another bounty | ⏰ Today (OVERDUE)
  • Header shows "Showing X of Y bounties"
  • Description sliced to 40 chars when showing pagination info
  • Date format changed to "4 Apr 2026" style

Fixes #48

## Summary Implements pagination, sorting, and filtering for the `/bounty` command. ## Changes ### Pagination - Default: 5 bounties per page - `/bounty 10` - show 10 bounties - `/bounty all` - show all active (exclude overdue >24h) - `/bounty all 10` - show 10 including expired ### Filtering - Overdue >24h filtered out by default - `all` flag includes overdue bounties ### Sorting - Bounties with due date: sorted by `due_date_ts` (earliest first) - Bounties without due date: shown last, sorted by `created_at` ### Output Format ``` Showing 5 of 12 bounties: [#1] Sliced description... | 🔗 link | ⏰ 4 Apr 2026 (2d) [#2] Another bounty | ⏰ Today (OVERDUE) ``` - Header shows "Showing X of Y bounties" - Description sliced to 40 chars when showing pagination info - Date format changed to "4 Apr 2026" style Fixes #48
shoko added 1 commit 2026-04-04 07:55:08 +02:00
- Default shows 5 bounties per page
- /bounty 10 - show 10 bounties
- /bounty all - show all active (exclude overdue >24h)
- /bounty all 10 - show 10 including expired

Filtering:
- Overdue >24h filtered out by default
- 'all' flag includes overdue

Sorting:
- Bounties with due date sorted by due_date_ts (earliest first)
- Bounties without due date shown last, sorted by created_at

Output format updated:
- Header shows 'Showing X of Y bounties'
- Description sliced to 40 chars when showing pagination info
- Date format changed to '4 Apr 2026' style

Fixes #48
han reviewed 2026-04-04 09:48:28 +02:00
@@ -63,3 +66,3 @@
parts.append(f"{due_str} (OVERDUE)")
elif days_left == 0:
parts.append(f"{due_str} (TODAY)")
parts.append(f"Today (OVERDUE)")
Collaborator

I'd like to change the format

Showing 5 of 12 bounties:
[#1] [Sliced description...](link) | Due: 4 Apr 2026 (2d)
[#2] Another bounty | Due: 13:00 (2 hours)

is that makes sense? OVERDUE is for the past. also make the sliced description longer, lets try 60 characters

I'd like to change the format ``` Showing 5 of 12 bounties: [#1] [Sliced description...](link) | Due: 4 Apr 2026 (2d) [#2] Another bounty | Due: 13:00 (2 hours) ``` is that makes sense? OVERDUE is for the past. also make the sliced description longer, lets try 60 characters
han requested changes 2026-04-04 09:49:20 +02:00
han left a comment
Collaborator

change the output format

change the output format
shoko merged commit e3b813661d into main 2026-04-04 10:09:30 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/jigaido#62