feat(/edit): per-argument updates + clear syntax + admin-only #61

Closed
shoko wants to merge 0 commits from fix/issue-46 into main
Owner

Summary

Implements per-argument updates, clear syntax, and admin-only permission for /edit command.

Changes

Per-Argument Updates

  • Each argument (text, link, date) is optional
  • Only provided arguments are updated

Clear Syntax (- prefix)

  • /edit 1 -link - clear link only
  • /edit 1 -date - clear date only
  • /edit 1 -link -date - clear both
  • /edit 1 new text -link - update text, clear link
  • /edit 1 -link https://new.com - clear link, add new link
  • If updating link to a new value, check uniqueness
  • If duplicate found, reject with error

Admin-Only

  • Only admins can use /edit (already enforced in service layer)

Updated Usage

/edit <id> [text] [link] [due_date]
/edit <id> -link       (clear link)
/edit <id> -date       (clear date)
/edit <id> -link -date (clear both)
/edit <id> new text    (update text only)

Fixes #46

## Summary Implements per-argument updates, clear syntax, and admin-only permission for /edit command. ## Changes ### Per-Argument Updates - Each argument (text, link, date) is optional - Only provided arguments are updated ### Clear Syntax (- prefix) - `/edit 1 -link` - clear link only - `/edit 1 -date` - clear date only - `/edit 1 -link -date` - clear both - `/edit 1 new text -link` - update text, clear link - `/edit 1 -link https://new.com` - clear link, add new link ### Link Uniqueness on Update - If updating link to a new value, check uniqueness - If duplicate found, reject with error ### Admin-Only - Only admins can use /edit (already enforced in service layer) ## Updated Usage ``` /edit <id> [text] [link] [due_date] /edit <id> -link (clear link) /edit <id> -date (clear date) /edit <id> -link -date (clear both) /edit <id> new text (update text only) ``` Fixes #46
shoko added 1 commit 2026-04-04 07:52:09 +02:00
- Add -link and -date flags to /edit command for field clearing
- /edit <id> -link - clear link
- /edit <id> -date - clear date
- /edit <id> -link <url> - set link
- /edit <id> -date <date> - set date
- /edit <id> text -link - update text, clear link
- /edit <id> text <url> - update text and set link
- Parse_args now returns (text, link, due_date_ts, clear_link, clear_date)
- Update usage messages and help text
- Fixes #46
han approved these changes 2026-04-04 09:39:25 +02:00
han left a comment
Collaborator

lgtm

lgtm
shoko closed this pull request 2026-04-04 09:41:11 +02:00
shoko deleted branch fix/issue-46 2026-04-04 09:41:11 +02:00

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/jigaido#61