Skip to content

Handle null responses when changing pull request draft state - #8995

Draft
Alex Ross (alexr00) with Copilot wants to merge 3 commits into
mainfrom
copilot/unable-to-convert-pr-to-draft
Draft

Alex Ross (alexr00) with Copilot wants to merge 3 commits into
mainfrom
copilot/unable-to-convert-pr-to-draft

Conversation

Copilot AI commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Converting a PR to draft in the agents window can fail with Cannot read properties of null (reading 'pullRequest') when GitHub returns a null mutation payload.

  • Response validation: Guard missing payloads in both draft conversion and ready-for-review transitions before updating state or emitting success telemetry.
  • Error reporting: Preserve GitHub error messages; provide a localized retry message when no updated pull request is returned.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 2 commits September 30, 2026 10:25
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unable to convert pull request to draft error Handle null responses when changing pull request draft state Sep 30, 2026
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.

Unable to convert pull request to draft. Cannot read properties of null (reading 'pullRequest')

2 participants