Skip to content

refactor(triage): decide whether a pull request may merge in one place (CL-12170) - #853

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-12170-decide-whether-a-pull-request-may-merge-in-one-place
Nov 5, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-12170-decide-whether-a-pull-request-may-merge-in-one-place

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Whether Triage may merge a pull request is now decided by one function, mergeGate in triage-contracts. It returns either allowed or a typed refusal with a cause (changes requested, review threads, or CI) and a reason.

  • The evaluation (heldApprovals) and both executors (GitHub do.ts, Bitbucket action.ts) call it. Their own copies of the CI, changes-requested and thread checks are gone.
  • mergeableCi is replaced by the gate. ciRefusal and the head CI type move from github-reads to triage-contracts.
  • Evaluation now also holds a merge while another reviewer requests changes, using the existing changesRequested fact. The merge is skipped and shown as waiting, the same way an open review thread holds it.
  • Bitbucket's mergeVeto still runs after the gate.
  • The portal's Merge button is unchanged here. It moves onto the gate in a follow-up PR.

Verification

  • bun run check and bun run lint pass.
  • bun --conditions=intx-src test ./packages ./tests/model (local Postgres): 764 pass, 0 fail.
  • bun --conditions=intx-src test --parallel=2 tests/chain: 13 pass, 0 fail.
  • New model check, "a merge waits while a reviewer requests changes": there is no merge write, and the comment says "Changes are requested by maya."

Refs 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

Merged before Triage finished on f48cf6d.

@TheGreatAxios
TheGreatAxios merged commit dcd3e4d 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant