feat: implement /recover command for listing and recovering soft-deleted bounties #65

Closed
shoko wants to merge 1 commits from fix/issue-49-recover-command into main
Owner

Summary

Implements the /recover command as specified in issue #49:

  1. List mode (jigaido-cli recover --group-id <id>): Shows all recoverable (soft-deleted) bounties sorted by deleted_at descending.

  2. Recover mode (jigaido-cli recover <id>... --group-id <id>): Recovers specific bounty(ies) by ID. Admin-only.

Changes

  • core/services.py: Add recover_bounty() method to BountyService
  • cli/main.py: Add cmd_recover() function and parser

Usage

# List recoverable bounties
jigaido-cli recover --group-id -1001

# Recover specific bounties (admin only)
jigaido-cli recover 1 2 3 --group-id -1001

Output Examples

List mode:

Recoverable bounties:
  [#1] Deleted bounty | Deleted 02 Apr 2026
  [#3] Another deleted | Deleted 01 Apr 2026

Recover mode:

Recovered bounty #1.
Recovered bounty #3.

Fixes #49

## Summary Implements the `/recover` command as specified in issue #49: 1. **List mode** (`jigaido-cli recover --group-id <id>`): Shows all recoverable (soft-deleted) bounties sorted by `deleted_at` descending. 2. **Recover mode** (`jigaido-cli recover <id>... --group-id <id>`): Recovers specific bounty(ies) by ID. Admin-only. ### Changes - **core/services.py**: Add `recover_bounty()` method to `BountyService` - **cli/main.py**: Add `cmd_recover()` function and parser ### Usage ```bash # List recoverable bounties jigaido-cli recover --group-id -1001 # Recover specific bounties (admin only) jigaido-cli recover 1 2 3 --group-id -1001 ``` ### Output Examples **List mode:** ``` Recoverable bounties: [#1] Deleted bounty | Deleted 02 Apr 2026 [#3] Another deleted | Deleted 01 Apr 2026 ``` **Recover mode:** ``` Recovered bounty #1. Recovered bounty #3. ``` Fixes #49
shoko added 1 commit 2026-04-04 09:00:40 +02:00
- Add recover_bounty method to BountyService for recovering soft-deleted bounties
- Add cmd_recover function to CLI with list and recover modes
- List mode: jigaido-cli recover --group-id <id>
- Recover mode: jigaido-cli recover <id>... --group-id <id>
- Admin-only for recover, everyone for list
- Fixes #49
shoko closed this pull request 2026-04-04 09:20:10 +02:00

Pull request closed

Sign in to join this conversation.