Skip to content

merge queue: checking #1862 on main (8814231) - #1870

Closed
mergify[bot] wants to merge 2 commits into
mainfrom
mergify/merge-queue/df43724354
Closed

mergify[bot] wants to merge 2 commits into
mainfrom
mergify/merge-queue/df43724354

Conversation

@mergify

@mergify mergify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🎉 This pull request has been checked successfully and will be merged soon. 🎉

#1862 is queued for merge on branch main (8814231).

This pull request has been created by Mergify to check the mergeability of #1862.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: 881423111a348554c58b36e4b406a00467a5c35f
previous_check_retries: []
previous_failed_batches: []
pull_requests:
  - number: 1862
    scopes: []
scopes: []
...

jd and others added 2 commits September 30, 2026 16:39
`stack push`, `list`, `sync` and `checkout` found a stack's pull
requests with `GET /search/issues`. Environments that only allow
repository-scoped API paths answer that with a 403, so every remote
stack command failed there. Claude Code on the web's GitHub proxy is
one of them.

Discovery now uses only `/repos/{owner}/{repo}/...` endpoints:

1. `GET /git/matching-refs/heads/<prefix>/` lists every branch under
   the stack prefix in one call, with no pagination. I checked this
   against a repository holding 1,308 matching branches. Only
   branches one segment below the prefix whose name ends in a
   Change-Id are kept, which is the shape `stack push` creates.
2. For each local commit whose Change-Id is on no live branch, the
   branch it would be pushed to (`<prefix>/<slug>`) is added. This is
   how a merged PR is still found after GitHub deleted its branch.
   `stack sync` needs that PR to drop the commit. The merged state only
   counts when the PR's `head.sha` equals the local commit, and an
   unchanged commit has an unchanged title, so its slug is the branch
   it was pushed under.
3. `GET /pulls?head=owner:<branch>&state=all` runs once per branch.
   That filter reads the PR's recorded head, so it also returns closed
   and merged PRs whose branch is gone. I checked this on a merged PR
   whose branch had been deleted.
4. Results are sorted by `updated_at`, newest first, the same order
   the search used, then grouped by Change-Id as before. The author
   filter runs locally on `user.login`, case-insensitively like
   `author:` was.

Why not one paginated `GET /pulls` listing filtered by head prefix?
Its cost grows with the number of open PRs in the repository, not
with the size of the stack. It also misses merged PRs, and those
would still need step 2. The approach above costs one call plus one
per branch. The old one cost one search call plus one per PR.

Search is not kept as a fallback. The only thing it could still find
is a merged PR whose branch is deleted and whose Change-Id is no
longer in the local stack. Nothing reads that PR: orphans are
reported only when open. Search also has its own small rate limit and
an index that lags behind new PRs, which the repository endpoints do
not.

The payloads now come from the list endpoint. It carries everything
downstream reads, including the native `stack` object, except
`mergeable`. `stack list` therefore fetches each unmerged PR itself
for its `(conflicting)` marker, as part of its CI and review fan-out.
`stack open` skips that, as it skips the fan-out.

Fixes #1861

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Ibd22adea3084f027d64718be8fa6f331a7cb9b9b
@mergify
mergify Bot deployed to Mergify Merge Protections October 1, 2026 16:14 Active
@mergify
mergify Bot deployed to func-tests-live October 1, 2026 16:14 Active
@mergify mergify Bot closed this Oct 1, 2026
@mergify
mergify Bot deleted the mergify/merge-queue/df43724354 branch October 1, 2026 16:22

This branch was successfully deployed

2 active deployments
func-tests-live — 34210535 Deployed Oct 1, 2026 by mergify[bot] via live-tests #1959
Mergify Merge Protections — 34210535 Deployed Oct 1, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant