Fix FOREIGN KEY constraint failed when operating on non-existent issues

Fixes #325

- Fix CloseIssue to check rows affected before inserting event
- Fix RemoveLabel to check rows affected before inserting event
- Fix UpdateIssueID to check rows affected before inserting event
- Prevent orphan events and confusing error messages

Amp-Thread-ID: https://ampcode.com/threads/T-aa765a68-5cc4-465b-a2f6-aa008933c11e
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-11-20 12:35:26 -05:00
parent 800b0c3fca
commit 09666b4219
3 changed files with 212 additions and 137 deletions

File diff suppressed because one or more lines are too long