Skip to content

Source control: pull request actions (A5) #641

Description

@Tryanks

Summary

Pull-request actions. Phase A5 of #535, in two deliveries. Depends on #640. Writes are interactive (may use the quota reserve), carry action-specific payloads, return domain-shaped results (applied, queued, pending with id, rejected, partial, uncertain), and are never retried on an ambiguous result.

A5a: review and conversation

Comment; submit a review (verdict, body, inline comments in one REST submission; host-owned drafts that survive switching layers or devices; a stale-head submission keeps the draft); reply in a thread; resolve / unresolve; reactions (subject verified to belong to the PR); edit own comment, title, body (omitted fields are not overwritten); labels (candidates and current; add in one request, remove one by one); reviewers (assignable users and current requests; no org team list). Node ids cached per PR (success only).

A5b: merge and lifecycle

Ready for review, convert to draft, close, reopen, revert (opens a revert PR), update branch (expectedHeadOid; merge by default, rebase on request; no-op when not behind), merge (fresh PullRequestActionState: id, head, merge-queue, merge state, behind count; method from the repository's enabled methods and the project default; confirmation showing exact host, repository, number, method and expected head; rejected if the head changed; "queued" and "auto-merge enabled" distinguished from "merged"; merge-message credit cleaning as an option), enable / disable auto-merge. Every merge, update-branch and auto-merge call is routed through stack policy from the start: a PR in a native stack uses async merge with the ordered affected layers, a middle-layer merge includes lower unmerged layers, native stacks have no auto-merge; until #642 lands those show "open on GitHub". After success or an ambiguous result the link state is refreshed; the sync sweep is asked for an immediate read.

UI

Row menu on linked rows (close, reopen, ready, draft, merge…), actions region in the PR tab; fast actions on Shift as upstream are optional.

Evidence required

Each write against a disposable repo: stale head rejected; queued vs merged reported correctly; ambiguous failure surfaced without retry; draft survives a head move.

Reference

T3 Code: apps/server/src/pullRequest/GitHubPullRequestApi.ts:2591–2849, mergeMessage.ts, apps/web/src/components/pullRequest/pullRequestDetail.logic.ts, PullRequestSpeedActions.tsx.

Activity

  1. added 2 commits that reference this issue on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions