Skip to content

fix(github): pull requests load on Enterprise Server again - #2

Open
zrm625 wants to merge 1 commit into
mainfrom
pyre/ghes-stack-fields
Open

zrm625 wants to merge 1 commit into
mainfrom
pyre/ghes-stack-fields

Conversation

@zrm625

@zrm625 zrm625 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

On GitHub Enterprise Server, the Pull Requests tab is empty and linked pull request summaries fail with Field 'stack' doesn't exist on type 'PullRequest'. The listing and summary documents name stack and stackEntry under @include(if: $stacks). Enterprise Server validates the whole document before it applies directives, so $stacks: false doesn't help. This is upstream issue pingdotgg/t3code#20436.

This keeps the approach of upstream #20531, which a maintainer took over and kept: Enterprise hosts get documents without the stack fields, and github.com gets ...WithStacks variants, so github.com makes the same requests as before. Compared with that PR and #31184:

  • One PullRequestStackFields fragment holds the stack fields. The github.com summary, the github.com search and the existing PullRequestStackMembership all use it, instead of each having its own copy.
  • One hasStacks(host) check replaces the inline host === "github.com" at each call.
  • The existing per-host listing test now also covers search and summary, and fails if any Enterprise read names a stack field. There is no new test case.
  • The graphql.config.ts comment no longer says to gate Enterprise-missing fields with @include.

Validation: vp run check:changed passes. The Enterprise test fails on main, where the search document names stack. It also fails if every host is sent the stack documents. I didn't run this against a live Enterprise server.

The original fix is felixlaga's; the commit credits them as co-author.

Implemented with Claude Opus 5.5 in Claude Code, through T3 Code.

Enterprise Server validates a whole GraphQL document before applying
directives, so the listing and summary documents fail there because they
name `stack` and `stackEntry`, even under `@include(if: false)`. Enterprise
hosts now get documents without those fields, and github.com gets
`PullRequestSearchWithStacks` and `PullRequestSummaryWithStacks`, which
share one `PullRequestStackFields` fragment with `PullRequestStackMembership`.

Co-authored-by: felixlaga <felix.laga@yahoo.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T03:15:47.820208Z 794dbf0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant