Skip to content

Preserve variables in legacy GraphQL queries - #8889

Open
Tamir Duberstein (tamird) wants to merge 1 commit into
microsoft:mainfrom
tamird:fix/legacy-graphql-variables
Open

Preserve variables in legacy GraphQL queries#8889
Tamir Duberstein (tamird) wants to merge 1 commit into
microsoft:mainfrom
tamird:fix/legacy-graphql-variables

Conversation

@tamird

Copy link
Copy Markdown

fd5f8d8 allowed legacy queries to replace their variables, but also cleared them when a caller supplied only a fallback query. PullRequestComments then retried without owner, name, or number, masking the original failure with invalid-variable errors.

Keep the original variables unless the fallback supplies replacements. Regression coverage exercises both inherited and explicitly replaced variables at the repository query boundary.

Prepared with Codex.

fd5f8d8 allowed legacy queries to replace their variables, but
also cleared them when a caller supplied only a fallback query.
PullRequestComments then retried without owner, name, or number,
masking the original failure with invalid-variable errors.

Keep the original variables unless the fallback supplies replacements.
Cover both inherited and explicitly replaced variables at the
repository query boundary.
@tamird
Tamir Duberstein (tamird) marked this pull request as ready for review August 20, 2026 21:14
Copilot AI lite review requested due to automatic review settings August 20, 2026 21:14

Copilot AI 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.

Pull request overview

Preserves GraphQL variables during legacy fallback queries, with regression coverage for inherited and replacement variables.

Changes:

  • Retains original variables unless fallback values are supplied.
  • Adds repository-level regression tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Summary
src/test/github/githubRepository.test.ts Tests inherited and replacement variable behavior.
src/github/githubRepository.ts Preserves variables during legacy fallback.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants