Skip to content

fix(hub): run the portal's Merge through the merge gate (CL-12170) - #854

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-12170-portal-merge-gate
Nov 5, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-12170-portal-merge-gate

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

The portal's Merge button now goes through the same merge gate as Triage's own merge. Before merging, the hub reads the head's CI, each reviewer's latest review and the open review threads, and refuses with 409 merge_refused and the gate's reason when a reviewer requests changes, a person's thread is open or CI has not passed. Bypassing the gate is left to a GitHub admin on GitHub.

  • The GitHub executor's gate reads move into readMergeGate in @corbits/github-tool/do, used by both the executor and the hub route.
  • Whether CI is optional comes from the repository's policy through mergesWithoutCi, now shared with the plan's merge step.
  • The portal already shows a route's error message, so apps/web is unchanged.
  • Bitbucket has no portal merge route; its merges run through the executor, which already uses the gate.
  • User Manual: one sentence on the pane's Merge. docs/ARCHITECTURE.md does not mention the portal merge.

Verification

  • New test in github-read-access.postgres.test.ts: a merge with changes requested, and one with failing CI, each answer 409 merge_refused and nothing is merged. It failed on main (github_failed from the merge call) and passes here.
  • bun run check, bun run lint, and the hub test, github-tool do.test.ts and triage-workflows actions.test.ts pass.

Closes CL-12170

@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CL-12170

@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Notes:

  • Risk: medium (3 recently fixed files)

corbits-triage[bot]
corbits-triage Bot previously approved these changes Nov 5, 2026

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@TheGreatAxios
TheGreatAxios merged commit 1beb25e into main Nov 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant