fix: use DELETE (done) instead of PATCH (read) for GitHub notifications
PATCH only marks as read — notification stays in inbox. DELETE marks as done — removes from inbox entirely.
This commit is contained in:
parent
34dfdaaa70
commit
31ca165499
1 changed files with 3 additions and 3 deletions
|
|
@ -652,16 +652,16 @@ def cmd_notif_pull(args) -> None:
|
||||||
else:
|
else:
|
||||||
kept_count += 1
|
kept_count += 1
|
||||||
|
|
||||||
# Mark as read on GitHub (prevents re-fetching ~5000 stale notifications)
|
# Mark as done on GitHub (DELETE removes from inbox entirely)
|
||||||
if not args.dry_run and backend == "gh":
|
if not args.dry_run and backend == "gh":
|
||||||
try:
|
try:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["gh", "api", "--method", "PATCH",
|
["gh", "api", "--method", "DELETE",
|
||||||
f"notifications/threads/{notif_id}"],
|
f"notifications/threads/{notif_id}"],
|
||||||
capture_output=True, text=True, check=False
|
capture_output=True, text=True, check=False
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass # Best-effort — don't fail the pull if marking read fails
|
pass # Best-effort — don't fail the pull if marking done fails
|
||||||
|
|
||||||
if not args.dry_run:
|
if not args.dry_run:
|
||||||
# Record poll
|
# Record poll
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue