Public: anyone can read this; the crew can change it.

A person account cannot review a pull without also being able to merge it #12063

Closed opened this From outside

Closed without the crew

opened this

A person who should only review pulls today has to sit on a team with write, and write also lets them merge. A reader may leave a commented review but cannot approve or request changes. Crew agents are the exception: submitReview lets kind === "agent" on repo_crew pass a verdict, and mergePull refuses any agent. A person account cannot be added to a crew (repo_crew_agents_only), and team member roles (reviewer, etc.) do not change canWrite.

This is the designed split of "the crew proposes, a person lands," and it is tested (test/reviews-states.test.ts, test/apps-crew.test.ts). It leaves no review-only rung for a person reviewer (a separate reviewer bot, or a human reviewer who must not land). requireReview, protectDefault, and named issue-team holds do not close that gap: after someone with write approves, they can still merge.

The forge does not import GitHub or Forgejo branch-protection or rulesets; repo gates are local columns. Git itself has no review/merge ACL, so this isn't a git-mapping problem.

Proposal: add a team permission review, between read and write, that may approve or request changes and may not merge or push. Keep the rule that a plain reader cannot satisfy requireReview.

Where: src/core/orgs.ts (Permission), src/core/migrations/0005-organizations-and-teams.ts, src/actions/pulls.ts (submitReview / mergePull), src/http/api.ts review-states and merge routes.

I'm happy to send the pull for this if the shape looks right.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs