Skip to content

fix(github): enqueue a merge-queue PR when auto-merge is disabled - #24327

Open
innocarpe wants to merge 5 commits into
stablyai:mainfrom
innocarpe:fix-19638-merge-queue-enqueue
Open

innocarpe wants to merge 5 commits into
stablyai:mainfrom
innocarpe:fix-19638-merge-queue-enqueue

Conversation

@innocarpe

Copy link
Copy Markdown
Contributor

Description

"Merge when ready" on a branch that requires a merge queue runs gh pr merge --auto. That command calls enablePullRequestAutoMerge. GitHub rejects it when the repository disables auto-merge (Auto merge is not allowed for this repository), which is a normal setup for a ruleset-required merge queue.

Focused fix

  • In scope: when the base branch requires a merge queue and autoMergeAllowed is false, add the pull request with enqueuePullRequest instead of gh pr merge --auto.
  • Out of scope: repositories that still allow auto-merge, direct merge, stacked pull requests, and disabling an existing auto-merge request.

Preserves

  • A merge queue whose repository still allows auto-merge keeps gh pr merge --auto, so a pull request that is not yet ready can still wait.
  • Unknown merge-queue metadata keeps that same path.
  • Direct merge of a merge-queue pull request stays blocked with the existing message.

Evidence

  • Test: node node_modules/vitest/vitest.mjs run --config config/vitest.config.ts src/main/github/client-merge-queue-auto-merge.test.ts
  • 16 passed.
  • Not run against a live repository whose ruleset requires a merge queue and disables auto-merge.

User-regression-tradeoffs

  • On a repository that disables auto-merge, "Merge when ready" now enqueues immediately. enqueuePullRequest still fails if the pull request does not yet meet the queue rules, and that error is shown instead of the auto-merge rejection.

Fixes #19638

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds merge-queue enqueue as alternative to auto-merge.

The PR appears safe to merge based on the reviewed changes.

Summary

The PR enqueues a pull request when its base branch requires a merge queue and the repository disallows auto-merge. It also carries queue membership through refresh and shows queued state and accurate success feedback in the UI.

  • Repositories that allow auto-merge retain the existing gh pr merge --auto path.
  • The previous queued-state finding has an explanatory author reply, is resolved, and is addressed by the current membership and presentation changes.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Merge when ready] --> B{Required merge queue?}
  B -->|No or unknown| C[Existing auto-merge path]
  B -->|Yes| D{Auto-merge allowed?}
  D -->|False| E[Enqueue pull request]
  D -->|True or unknown| F[gh pr merge --auto]
  E --> G[Report queued result]
  G --> H[Refresh queue membership and show In merge queue]
Loading

Reviews (5) · Last reviewed commit: "fix(github): accept the merge-queue enti..."

Comment thread src/main/github/client/merge/pr-auto-merge.ts Outdated

@pullfrog pullfrog 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 critical issues — one minor suggestion inline.

Reviewed changes

  • Enqueue path for disabled auto-merge: enablePRAutoMerge now calls the enqueuePullRequest GraphQL mutation when the base branch requires a merge queue and the repository disallows auto-merge, instead of the failing gh pr merge --auto.
  • Decision helper: new mergeQueueDisallowsAutoMerge reuses detectRepositoryMergeMetadata to pick between the enqueue mutation and the existing --auto path; unknown metadata and queue-with-auto-merge still fall back to --auto.
  • Test: added coverage asserting the enqueue mutation is invoked and no --auto merge command runs.

I verified the enqueuePullRequest mutation against GitHub's public schema (EnqueuePullRequestInput with pullRequestId: ID! and optional expectedHeadOid: GitObjectID, returning mergeQueueEntry), and confirmed the control stays reachable for this case since canRequestWhenReady short-circuits on mergeQueueRequired === true.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/main/github/client/merge/pr-auto-merge.ts Outdated
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

When a merge queue is required and auto-merge is disallowed, the auto-merge flow now adds the pull request directly to the queue and returns an enqueued result flag. Pull request lookup can read and propagate queue membership. The renderer presents queued pull requests without direct-merge or auto-merge actions, and success messages distinguish queue enrollment from ordinary auto-merge enablement.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 21bc8

Some fallback paths may still show merge actions for a pull request already in the queue. The main enrollment path works, so this is a bounded UI gap to fix or explicitly accept before merging.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 21bc8

The new enrollment path uses the existing GitHub execution context and repository controls. No security-control bypass was demonstrated, but recovery after interrupted requests and live merge-queue behavior remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new privileged outcome is enrollment of the selected PR into its repository's merge queue, with potential subsequent merging into its base branch. The inspected request is scoped by the resolved repository, PR node ID, and existing execution context; effective credential permissions were not independently audited.

Trust Boundaries and Controls

  • observed — Renderer callbacks interpret returned state after the existing local or environment mutation call. The main-process path resolves repository identity and passes expectedHeadOid when available to GitHub. GitHub remains the queue-acceptance authority; the client permits omission of the head guard if identity lookup omits it.

Resilience and Maintainability Implications

  • inferred — Local rollback is not evidence that remote enrollment failed. The inspected quiet refresh requires confirmed authority state, so it does not establish recovery for an isolated ambiguous failure. This is an inherited recovery limitation, not a demonstrated PR-introduced authorization bypass.

Hardening Proposals

  • proposed — Consider treating transport failure as an indeterminate enrollment outcome and re-reading membership for the same repository and PR before retry. This would distinguish local rollback from remote queue state without assuming duplicate enrollment is idempotent.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, scoped fix, preserved behavior, testing, trade-offs, and linked issue. However, it does not follow the required template and omits several required sections, incl… Reorganize the existing content under the required template headings. Add the missing ELI5, What Changed, Why, Review, Notes, and Checklist sections. Add Visual Proof or write N/A with a reason if no visual or interaction change applies. Co…
Docstring Coverage ⚠️ Warning Docstring coverage is 4.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 27 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: enqueueing merge-queue pull requests when auto-merge is disabled.
Linked Issues check ✅ Passed Issue #19638 requires enqueueing a pull request when the base branch requires a merge queue and auto-merge is disallowed. enablePRAutoMerge now uses the GraphQL enqueue mutation with the pull reques…
Out of Scope Changes check ✅ Passed The changes remain within issue #19638. Queue metadata lookup, queue membership propagation, enqueue result handling, success messaging, and suppression of actions for queued pull requests support the…
Full details: Description check

Explanation

The description explains the problem, scoped fix, preserved behavior, testing, trade-offs, and linked issue. However, it does not follow the required template and omits several required sections, including ELI5, What Changed, Why, Visual Proof or an explicit N/A explanation, Review, Notes, and Checklist details.

Resolution

Reorganize the existing content under the required template headings. Add the missing ELI5, What Changed, Why, Review, Notes, and Checklist sections. Add Visual Proof or write N/A with a reason if no visual or interaction change applies. Complete the Testing checklist and state platform coverage. Complete AI Disclosure when applicable and the Agent skill upstream boundary checkbox.

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@innocarpe
innocarpe force-pushed the fix-19638-merge-queue-enqueue branch from 8ddb974 to 2205315 Compare October 1, 2026 09:45
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (2205315506)

Address review: enqueue and auto-merge now share one metadata read. A successful enqueue returns enqueued, the toast says the pull request was added to the merge queue, and a pull request already in the queue no longer offers Merge when ready.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 10b64805-e4d6-4c22-b200-8dc2763b915c

📥 Commits

Reviewing files that changed from the base of the PR and between 8ddb974 and 2205315.

📒 Files selected for processing (25)
  • src/main/github/client-merge-queue-auto-merge.test.ts
  • src/main/github/client/fetch/work-item-fetch.ts
  • src/main/github/client/lookup/pr-branch-lookup.ts
  • src/main/github/client/lookup/pr-number-lookup.ts
  • src/main/github/client/lookup/pr-refresh-outcome-assembly.ts
  • src/main/github/client/lookup/pull-request-lookup-data.ts
  • src/main/github/client/lookup/pull-request-lookup-hydration.ts
  • src/main/github/client/lookup/pull-request-merge-queue-membership.ts
  • src/main/github/client/merge/pr-auto-merge.ts
  • src/preload/api/gh-bridge-mutations-and-projects.ts
  • src/preload/api/github-pull-request-api.ts
  • src/renderer/src/components/github-auto-merge-success-toast.ts
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-panel.tsx
  • src/renderer/src/components/github-pr-merge-state.test.ts
  • src/renderer/src/components/github-pr-merge-state.ts
  • src/renderer/src/components/pull-request-page/actions/merge-actions.ts
  • src/renderer/src/components/right-sidebar/HostedReviewActions.tsx
  • src/renderer/src/components/task-page-linear-jira-list-model.tsx
  • src/renderer/src/components/task-page-work-item-signatures.ts
  • src/renderer/src/components/task-page/github/MergeCell.tsx
  • src/renderer/src/hooks/useTaskPageGitHubWorkItemMutation.ts
  • src/shared/github/pull-request-types.ts
  • src/shared/github/work-item-types.ts
  • src/shared/hosted-review-github.ts
  • src/shared/hosted-review.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Comment thread src/renderer/src/components/github-auto-merge-success-toast.ts
Comment thread src/renderer/src/components/task-page/github/MergeCell.tsx

@pullfrog pullfrog 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.

Caution

The new commit does not typecheck. pnpm tc:web (part of pnpm typecheck and pnpm build:desktop) reports three errors introduced by this delta, so the PR cannot build as-is. Per-line fixes below.

Reviewed changes

  • Queue-membership read: added readPullRequestInMergeQueue (GraphQL isInMergeQueue) and threaded inMergeQueue through PR lookup, work-item fetch, refresh assembly, and the shared PRInfo / GitHubWorkItem / HostedReviewInfo types.
  • Queued presentation: presentGitHubPRMergeState now returns an "In merge queue" state and suppresses the auto-merge action when inMergeQueue === true.
  • Enqueue-aware toast: new githubAutoMergeSuccessToast, with successToastFromResult plumbing, so an enqueue reports "Added to the merge queue" instead of "Auto-merge enabled".
  • Decision refactor: shouldUseMergeQueueAutoMerge + mergeQueueDisallowsAutoMerge collapsed into mergeQueueEnqueueDecision ('enqueue' | 'auto' | 'skip') over one metadata read.

🚨 The renderer does not typecheck

node node_modules/typescript/bin/tsc --noEmit -p config/tsconfig.tc.web.json reports exactly three errors, all in the new delta. The main-process project (config/tsconfig.node.json) is clean, so this is renderer-only.

Technical details
# Renderer typecheck fails

## Affected sites
- `src/renderer/src/components/github-pr-merge-state.test.ts:30` — `TS2353`: `{ ok: true }` has no property in common with `{ enqueued?: boolean } | void` (excess property check).
- `src/renderer/src/components/right-sidebar/HostedReviewActions.tsx:96` — `TS2339`: `Property 'inMergeQueue' does not exist on type 'HostedReviewActionInfo'`.
- `src/renderer/src/hooks/useTaskPageGitHubWorkItemMutation.ts:167` — `TS2345`: `typed` (`{ ok?: boolean; error?: string | { message?: string } } | void`) is not assignable to `{ enqueued?: boolean } | void`.

## Reproduction
- `pnpm tc:web` (or `node node_modules/typescript/bin/tsc --noEmit -p config/tsconfig.tc.web.json`).

## Required outcome
- `pnpm tc:web` passes, with the enqueue result still reaching the toast and `review.inMergeQueue` still contributing to the merge state.

## Suggested approach (optional)
- One fix per site; see the inline comments.

ℹ️ Nitpicks

  • presentPullRequestInMergeQueue is a merge-state presentation but lives in github-auto-merge-success-toast.ts, so github-pr-merge-state.ts imports it back from the toast module. The reverse import is type-only (so still acyclic), but the file name now under-describes its contents; a small dedicated module would read better.
  • readPullRequestInMergeQueue is uncached while detectRepositoryMergeMetadata caches for 10 minutes, so each PR refresh on a merge-queue branch adds one GraphQL query per PR. Fine if membership must stay live, but a conscious call for large scans.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/renderer/src/components/github-pr-merge-state.test.ts Outdated
Comment thread src/renderer/src/components/right-sidebar/HostedReviewActions.tsx Outdated
Comment thread src/renderer/src/hooks/useTaskPageGitHubWorkItemMutation.ts
@innocarpe
innocarpe force-pushed the fix-19638-merge-queue-enqueue branch from 2205315 to 194b88f Compare October 1, 2026 10:57
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (194b88f103)

The web typecheck accepts an enqueue result. The toast test passes an empty result for the not-enqueued branch, and the hosted review no longer reads inMergeQueue from a type that does not have it.

@pullfrog pullfrog 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 new issues found.

Reviewed changes

Since the prior pullfrog review (2205315506), the branch was amended to fix the three renderer typecheck errors it flagged:

  • Fixed the not-enqueued toast test: github-pr-merge-state.test.ts passes {} instead of { ok: true }, which the weak { enqueued?: boolean } | void parameter rejected as TS2353.
  • Dropped the review.inMergeQueue override: HostedReviewActions now relies on the ...githubPR spread (a PRInfo that already carries inMergeQueue), clearing TS2339 without changing behavior — the ?? githubPR?.inMergeQueue fallback was the effective value anyway.
  • Kept enqueued in the mutation result type: both mutate signatures and the typed cast in useTaskPageGitHubWorkItemMutation include enqueued?: boolean, so the enqueue flag reaches successToastFromResult.

Verified at 194b88f:

  • tsc --noEmit for the node, web, and cli projects all exit 0.
  • github-pr-merge-state.test.ts and client-merge-queue-auto-merge.test.ts pass (31 tests).
  • oxlint clean on the three changed files.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@innocarpe
innocarpe force-pushed the fix-19638-merge-queue-enqueue branch from 194b88f to d06b7a5 Compare October 1, 2026 11:44
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (d06b7a598b)

An enqueue result now confirms the task row with auto-merge off and in the merge queue. The button no longer stays on Merge when ready after the pull request was queued.

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟠 Major · Add serverEntityFromResult to the shared runner… · task-page-linear-jira-list-model.tsx:173-189

src/renderer/src/components/task-page-linear-jira-list-model.tsx:173-189
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add serverEntityFromResult to the shared runner contract.

MergeCell passes serverEntityFromResult, but TaskPageGitHubWorkItemMutationRunner.run does not declare it. The supported web typecheck therefore fails with TS2353, blocking that typecheck workflow.

Suggested fix
     successToast?: string
     successToastFromResult?: (result: { enqueued?: boolean } | void) => string
+    serverEntityFromResult?: (result: unknown) => Partial<GitHubWorkItem> | undefined
     errorToast: string

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4b73b577-8d1c-450d-bb07-0d84b4ac8121

📥 Commits

Reviewing files that changed from the base of the PR and between 194b88f and d06b7a5.

📒 Files selected for processing (3)
  • src/renderer/src/components/task-page-github-work-item-mutation-lifecycle.ts
  • src/renderer/src/components/task-page-github-work-item-mutation-regressions.test.ts
  • src/renderer/src/components/task-page/github/MergeCell.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@pullfrog pullfrog 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.

Caution

The new commit does not typecheck. MergeCell now passes serverEntityFromResult to a runner whose type never declared it, so pnpm tc:web fails with TS2353 and the renderer/desktop build cannot complete. One-line fix inline.

Reviewed changes

Since the prior pullfrog review (194b88f), the branch was force-pushed into new commits that:

  • Confirm an enqueue as queued: applyServerEntityIfPresent now applies inMergeQueue from the server entity, so a confirmed enqueue clears the optimistic auto-merge flag and the cell shows "In merge queue".
  • Regression test: added a test asserting an enqueue confirms as { autoMergeEnabled: false, inMergeQueue: true } and records autoMerge: false.
  • Pass the queued server entity from MergeCell: handleAutoMerge now supplies serverEntityFromResult, returning { autoMergeEnabled: false, inMergeQueue: true } when the result is enqueued: true. This is the call that does not typecheck.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/renderer/src/components/task-page-linear-jira-list-model.tsx
innocarpe and others added 5 commits October 1, 2026 21:23
gh pr merge --auto calls enablePullRequestAutoMerge, which GitHub
rejects when a required merge queue also disallows auto-merge.
Enqueue does not set autoMergeRequest, so the button stayed on Merge when ready and the toast said auto-merge was enabled. One metadata read now chooses enqueue, and a queued pull request no longer offers it again.

Co-authored-by: Cursor <cursoragent@cursor.com>
The toast parameter is a weak type, so an ok-only object and a cast that dropped enqueued failed the web typecheck. The hosted review reads inMergeQueue from the pull request that already carries it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
MergeCell already returns the queued work item from the enqueue result. The runner type omitted that callback, so the web typecheck rejected the call.
@innocarpe
innocarpe force-pushed the fix-19638-merge-queue-enqueue branch from d06b7a5 to 21bc876 Compare October 1, 2026 12:25
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (21bc876eeb)

The mutation runner now accepts the queued work item callback MergeCell already passes. The web typecheck is clean.

@pullfrog pullfrog 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 new issues found.

Reviewed changes

Since the prior pullfrog review (d06b7a5), the only delta is one line:

  • Runner contract accepts the queued server entity: TaskPageGitHubWorkItemMutationRunner.run now declares serverEntityFromResult, matching the hook's input, so MergeCell.tsx:170 typechecks again and the queued { autoMergeEnabled: false, inMergeQueue: true } entity still reaches confirmTaskPageGitHubWorkItemMutation.

Verified at 21bc876e:

  • node node_modules/typescript/bin/tsc --noEmit -p config/tsconfig.tc.web.json exits 0.
  • 47 focused tests pass: task-page-github-work-item-mutation-regressions (16), github-pr-merge-state (15), client-merge-queue-auto-merge (16).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

🟡 Minor · Hydrate branch lookup fallbacks before exposing merge controls. · pr-branch-lookup.ts:68-70

src/main/github/client/lookup/pr-branch-lookup.ts:68-70
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Hydrate branch lookup fallbacks before exposing merge controls.

getPRByNumber(..., { readQueueMembership: true }) can return null, and the catch path also returns branchData directly. Branch data from the REST/list lookup does not contain inMergeQueue. The no-candidate branch path returns similarly unhydrated data.

A supported non-stacked branch lookup can therefore return a queued PR without membership data. If its merge metadata is clean, github-pr-merge-state.ts sets directMergeAvailable to true. Apply queue-aware hydration to the branch fallbacks before returning them. This requires a branch-specific correction; the number-lookup hydration does not cover these exits.

🟡 Minor · Retain queue membership when merge metadata is unknown. · work-item-fetch.ts:125-132

src/main/github/client/fetch/work-item-fetch.ts:125-132
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Retain queue membership when merge metadata is unknown.

When detectRepositoryMergeMetadata fails, it returns mergeQueueRequired: null. The current === true check then skips readPullRequestInMergeQueue. The REST fallback skips that lookup entirely. An already-queued, mergeable PR can therefore reach the renderer without inMergeQueue and receive direct merge controls.

Read membership when mergeQueueRequired is unknown, and add the same best-effort lookup to the known-repository REST fallback. readPullRequestInMergeQueue already returns undefined on rate-limit, parse, or request failures, so preserve the existing result when membership is unavailable.

Suggested fix
         const mergeMetadata = await detectRepositoryMergeMetadata(ownerRepo, baseRefName, ghOptions)
         const inMergeQueue =
-          mergeMetadata.mergeQueueRequired === true
+          mergeMetadata.mergeQueueRequired !== false
             ? await readPullRequestInMergeQueue(ownerRepo, number, ghOptions)
             : undefined
@@
       )
       const reviewFields = await fetchPullRequestReviewFields(number, ownerRepo, ghOptions)
-      return { ...mapped, ...reviewFields }
+      const inMergeQueue = await readPullRequestInMergeQueue(ownerRepo, number, ghOptions)
+      return {
+        ...mapped,
+        ...reviewFields,
+        ...(inMergeQueue !== undefined ? { inMergeQueue } : {})
+      }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 9ec3ee96-3784-4df8-b39a-9d62313c686e

📥 Commits

Reviewing files that changed from the base of the PR and between d06b7a5 and 21bc876.

📒 Files selected for processing (1)
  • src/renderer/src/components/task-page-linear-jira-list-model.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

This branch has not been deployed

No deployments
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.

[Bug]: "Merge when ready" fails on repositories with a required merge queue

1 participant