Use test merge commits for package state - #1328
Open
Jake Bailey (jakebailey) wants to merge 3 commits into
Open
Conversation
Capture PR 75475 demonstrating that a stale pull request head is incorrectly interpreted as changing package owners.
Read proposed package metadata from GitHub's generated test merge commit instead of the raw pull request head. Verify that its parents match the reported base and head before trusting it, and fail closed when it is unavailable.
Copilot started reviewing on behalf of
Jake Bailey (jakebailey)
September 1, 2026 18:58
View session
There was a problem hiding this comment.
Pull request overview
Uses GitHub’s generated merge commit when deriving package state, preventing stale PR bases from producing incorrect ownership data.
Changes:
- Queries and validates
potentialMergeCommit. - Uses its tree for package-state lookups.
- Adds generated GraphQL artifacts, validation tests, and fixture coverage.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/mergebot/src/pr-info.ts |
Validates and uses the merge commit. |
packages/mergebot/src/queries/pr-query.ts |
Queries merge commit metadata. |
packages/mergebot/src/queries/schema/graphql.ts |
Updates generated GraphQL types/document. |
packages/mergebot/src/queries/schema/gql.ts |
Updates generated query mappings. |
packages/mergebot/src/_tests/fixturedActions.test.ts |
Adds compatibility and validation tests. |
packages/mergebot/src/_tests/fixtures/75475/_response.json |
Records the GraphQL response. |
packages/mergebot/src/_tests/fixtures/75475/_files.json |
Records base and merge-tree files. |
packages/mergebot/src/_tests/fixtures/75475/_downloads.json |
Records package downloads. |
packages/mergebot/src/_tests/fixtures/75475/derived.json |
Records derived state. |
packages/mergebot/src/_tests/fixtures/75475/result.json |
Records expected actions. |
packages/mergebot/src/_tests/fixtures/75475/mutations.json |
Records expected mutations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use the trusted base tree as placeholder package state when GitHub cannot create a test merge commit due to conflicts. The conflict still blocks merging until the author resolves it.
Copilot started reviewing on behalf of
Jake Bailey (jakebailey)
September 1, 2026 19:07
View session
Member
Author
|
I think this is fine but it rarely happens that anyone sends a PR from an ancient fork, it just happened during my week and I thought it was fixable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If someone sends a PR from and old commit, then we'll get author data wrong. Use the GitHub generated merge commit instead.