fix: also add write:notification scope to mark notifications as read

This commit is contained in:
damocles 2026-05-20 19:08:21 +02:00
parent 72aef13eaf
commit 49caf6e539

View file

@ -55,8 +55,10 @@ const SEEDED_ORGS: &[&str] = &[CONFIG_ORG];
/// - `write:misc` — hooks, attachments, the rest of the long tail. /// - `write:misc` — hooks, attachments, the rest of the long tail.
/// - `read:notification` — required by forge_notify to poll /// - `read:notification` — required by forge_notify to poll
/// `GET /notifications` for unread PR/review events. /// `GET /notifications` for unread PR/review events.
/// - `write:notification` — required by forge_notify to mark
/// notifications as read via `PATCH /notifications/threads/{id}`.
const TOKEN_SCOPES: &str = const TOKEN_SCOPES: &str =
"read:user,write:user,read:notification,write:repository,write:issue,write:organization,write:misc"; "read:user,write:user,read:notification,write:notification,write:repository,write:issue,write:organization,write:misc";
/// Token file inside the agent's bind-mounted state dir (visible as /// Token file inside the agent's bind-mounted state dir (visible as
/// `/state/forge-token` from inside the container). /// `/state/forge-token` from inside the container).