Loosen the Forgejo trigger write-access gate #215

Merged
lucas merged 1 commit from agent/issue-214-loosen-write-gate into main 2026-11-03 11:16:11 +01:00
Collaborator

Closes: #214

  • The repo owner (from row.repo) and the issue/PR opener skip the permission check entirely (case-insensitive).
  • New DispatchApi.readRepoPrivate; on private repos a read author may trigger only conversation reasons on a non-PR issue whose mapped session (if any) is a forgejo_conversation. The visibility lookup runs last; any API failure drops the trigger.
  • Settings panel text updated.

Note: the test "an opener without write access is dropped" (issue-title trigger) was removed. An issue-opened trigger's author is always the opener, so it is now allowed by design.

Tests: bun test src/forgejo/dispatcher.test.ts passes (161 tests), including new exemption cases. A tsc error in bridge/session-policy.test.ts existed before this change.

Closes: #214 - The repo owner (from `row.repo`) and the issue/PR opener skip the permission check entirely (case-insensitive). - New `DispatchApi.readRepoPrivate`; on private repos a `read` author may trigger only conversation reasons on a non-PR issue whose mapped session (if any) is a `forgejo_conversation`. The visibility lookup runs last; any API failure drops the trigger. - Settings panel text updated. Note: the test "an opener without write access is dropped" (issue-title trigger) was removed. An issue-opened trigger's author is always the opener, so it is now allowed by design. Tests: `bun test src/forgejo/dispatcher.test.ts` passes (161 tests), including new exemption cases. A `tsc` error in `bridge/session-policy.test.ts` existed before this change.
The repository owner and the opener of the issue or PR a trigger is on
are always allowed. On private repositories, authors with read access
may converse on issues, as long as the trigger can only reach a
conversation session (no PRs, no label/open/review triggers, no mapped
non-conversation session). Visibility comes from the Forgejo API, never
the webhook payload.

Co-Authored-By: Claude Opus 5.5 via omp-deck
lucas approved these changes 2026-11-03 11:16:06 +01:00
lucas merged commit 6c6290f945 into main 2026-11-03 11:16:11 +01:00
lucas deleted branch agent/issue-214-loosen-write-gate 2026-11-03 11:16:11 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lucas/omp-deck!215
No description provided.