Skip to content

XS✔ ◾ Fix NonInteractive Invoke-WebRequest failure in GitHub WebHook pipeline - #888

Merged
Neil (neilr81) merged 2 commits into
mainfrom
neilr-microsoft-fix-webhook-usebasicparsing
Aug 31, 2026
Merged

XS✔ ◾ Fix NonInteractive Invoke-WebRequest failure in GitHub WebHook pipeline#888
Neil (neilr81) merged 2 commits into
mainfrom
neilr-microsoft-fix-webhook-usebasicparsing

Conversation

@neilr81

Copy link
Copy Markdown
Contributor

Windows PowerShell 5.1's Invoke-WebRequest parses responses with the IE COM engine. On the hosted windows-2022 agent IE first-run configuration has not been completed, so parsing tries to prompt and throws PSInvalidOperationException in NonInteractive mode. The POST itself succeeds and the forward build is queued, but the task still fails.

Add -UseBasicParsing to skip the IE DOM parser. StatusCode, Headers and RawContent used later in the script are unaffected.

Windows PowerShell 5.1's Invoke-WebRequest parses responses with the IE
COM engine. On the hosted windows-2022 agent IE first-run configuration
has not been completed, so parsing tries to prompt and throws
PSInvalidOperationException in NonInteractive mode. The POST itself
succeeds and the forward build is queued, but the task still fails.

Add -UseBasicParsing to skip the IE DOM parser. StatusCode, Headers and
RawContent used later in the script are unaffected.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 31, 2026 07:01
@neilr81
Neil (neilr81) requested a review from a team as a code owner August 31, 2026 07:01

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.

Copilot wasn't able to review any files in this pull request.


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

@neilr81
Neil (neilr81) deployed to github-app-main August 31, 2026 07:01 — with GitHub Actions Active
@microsoft-omex

Copy link
Copy Markdown
Contributor

PR Metrics

Thanks for keeping your pull request small.
Thanks for adding tests.

Lines
Product Code -
Test Code -
Subtotal -
Ignored Code 1
Total 1

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@microsoft-omex microsoft-omex Bot changed the title Fix NonInteractive Invoke-WebRequest failure in GitHub WebHook pipeline XS✔ ◾ Fix NonInteractive Invoke-WebRequest failure in GitHub WebHook pipeline Aug 31, 2026
@neilr81
Neil (neilr81) deployed to github-app-main August 31, 2026 07:34 — with GitHub Actions Active
@neilr81
Neil (neilr81) enabled auto-merge (squash) August 31, 2026 07:38
@neilr81
Neil (neilr81) merged commit 21bf282 into main Aug 31, 2026
8 checks passed
@neilr81
Neil (neilr81) deleted the neilr-microsoft-fix-webhook-usebasicparsing branch August 31, 2026 07:39
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.

3 participants