Skip to content

fix: correct GraphQL mutation name to markPullRequestReadyForReview#36494

Merged
pelikhan merged 5 commits into
mainfrom
copilot/fix-mark-pull-request-name
Jun 2, 2026
Merged

fix: correct GraphQL mutation name to markPullRequestReadyForReview#36494
pelikhan merged 5 commits into
mainfrom
copilot/fix-mark-pull-request-name

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

mark_pull_request_as_ready_for_review was calling markPullRequestAsReadyForReview (with "As") — a mutation that doesn't exist in the GitHub GraphQL schema — causing a hard failure on every invocation.

Changes

  • mark_pull_request_as_ready_for_review.cjs

    • Rename mutation in the GraphQL query string: markPullRequestAsReadyForReviewmarkPullRequestReadyForReview
    • Update result key access to match: result.markPullRequestAsReadyForReviewresult.markPullRequestReadyForReview
    • Fix stale JSDoc reference to the old name
  • mark_pull_request_as_ready_for_review.test.cjs

    • Align mock response keys and toHaveBeenCalledWith string matchers with the corrected mutation name
# Before (invalid — Field doesn't exist on type 'Mutation')
markPullRequestAsReadyForReview(input: { pullRequestId: $pullRequestId }) { ... }

# After (correct per GitHub GraphQL schema)
markPullRequestReadyForReview(input: { pullRequestId: $pullRequestId }) { ... }

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mutation name for marking pull request as ready for review fix: correct GraphQL mutation name to markPullRequestReadyForReview Jun 2, 2026
Copilot AI requested a review from pelikhan June 2, 2026 17:25
@pelikhan pelikhan marked this pull request as ready for review June 2, 2026 17:37
Copilot AI review requested due to automatic review settings June 2, 2026 17:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a hard failure in the mark_pull_request_as_ready_for_review safe-output handler by correcting the GitHub GraphQL mutation field name to the actual schema mutation (markPullRequestReadyForReview), and updating tests to match.

Changes:

  • Correct the GraphQL mutation field name in the query string.
  • Update the GraphQL response access key to match the corrected mutation.
  • Update unit tests’ mock payloads and expectations to use the corrected mutation name.
Show a summary per file
File Description
actions/setup/js/mark_pull_request_as_ready_for_review.cjs Fixes the GraphQL mutation field name and result key used to mark PRs ready for review.
actions/setup/js/mark_pull_request_as_ready_for_review.test.cjs Aligns mocked GraphQL responses and assertions with the corrected mutation name.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@pelikhan pelikhan enabled auto-merge (squash) June 2, 2026 18:05
@pelikhan pelikhan merged commit f6b7194 into main Jun 2, 2026
@pelikhan pelikhan deleted the copilot/fix-mark-pull-request-name branch June 2, 2026 18:05
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.

fix: mark_pull_request_as_ready_for_review safe output uses wrong GraphQL mutation name

3 participants