Skip to content

Add -NoCheckout switch to PRTest.ps1 - #440849

Merged
Demitrius Nelon (denelon) merged 2 commits into
microsoft:masterfrom
Trenly:copilot/prtest-no-checkout-artifact
Sep 26, 2026
Merged

Demitrius Nelon (denelon) merged 2 commits into
microsoft:masterfrom
Trenly:copilot/prtest-no-checkout-artifact

Conversation

@Trenly

@Trenly Kaleb Luedtke (Trenly) commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a -NoCheckout switch to Tools\PRTest.ps1. Instead of checking out the pull request locally, it retrieves the pull request's WinGet Validator 10. Validation Completed check run, downloads the associated validation artifact, extracts only the singleton merged manifest YAML entry, stages it under a PR- and head-SHA-scoped folder in $env:TEMP\WinGet-PRTest, and runs SandboxTest.ps1 against it (implying -SkipManifestValidation).

Existing checkout-mode behavior is unchanged.

Changes

  • Tools\PRTest.ps1:
    • New -NoCheckout switch
    • Resolves the PR head SHA and the app-scoped 10. Validation Completed check run
    • Parses ArtifactDownloadUrl from the check output and downloads the artifact
    • Extracts only the YAML manifest entry from the archive using [System.IO.Compression.ZipFile] and [System.IO.Compression.ZipFileExtensions]::ExtractToFile(), avoiding extraction of installation verification logs that can hit long-path issues
    • Stages artifacts under WinGet-PRTest\<PullRequest>\<headSha>\, retaining artifacts.zip alongside the extracted Manifest folder
    • -Clean removes the entire WinGet-PRTest root folder before retrieving the artifact
    • Documented exit codes for missing dependency, checkout failure, missing validation check, missing artifact URL, and missing YAML manifest

Validation performed

Note

No related open/closed issue was found in microsoft/winget-pkgs, and issue creation requires explicit confirmation per repository conventions that was not available during this session. This PR does not yet link to an issue — please link one or confirm creating a new feature_request.yml issue before merge.

Generated with assistance from GitHub Copilot.

Checklist

Add a -NoCheckout switch to Tools\PRTest.ps1 that fetches the PR's
validated merged manifest from the WinGet Validator artifact instead of
checking out the pull request locally.

* Resolve the PR head SHA and locate the app-scoped
  10. Validation Completed check run
* Parse the artifact download URL from the check output and download,
  extract, and stage the singleton YAML manifest into a folder named
  for the PR number under $env:TEMP\WinGet-PRTest
* Run SandboxTest.ps1 against the staged manifest with
  -SkipManifestValidation implied
* Preserve existing checkout-mode behavior
* Document exit codes for missing dependencies, checkout failure,
  missing validation check, missing artifact URL, and missing YAML
@wingetvalidator-prod wingetvalidator-prod Bot added the Project-File The pull request modifies repository project or configuration files. label Sep 24, 2026
@Trenly
Kaleb Luedtke (Trenly) marked this pull request as ready for review September 24, 2026 23:17
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Validation Pipeline Badge Publish Pipeline Badge

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Changes to one or more files in your PR require authorization to modify. This PR has been assigned to our on call staff to evaluate.

Template: msftbot/requiresApproval/MSFT

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Attention This work item needs to be reviewed by a member of the core team. label Sep 24, 2026
Comment thread Tools/PRTest.ps1 Outdated
Comment thread Tools/PRTest.ps1 Outdated
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Moderator-Approved One of the Moderators has reviewed and approved this PR label Sep 24, 2026
Comment thread Tools/PRTest.ps1 Outdated
* Extract only the YAML manifest entry from the validation artifact
  using [System.IO.Compression.ZipFile] and
  [System.IO.Compression.ZipFileExtensions]::ExtractToFile(), avoiding
  extraction of installation verification logs that can hit long-path
  issues
* Nest artifact paths as WinGet-PRTest\<PR>\<headSha>\, retaining
  artifacts.zip alongside the extracted Manifest folder
* Consolidate cleanup to a single upfront removal of the run folder
* Support -Clean by removing the entire WinGet-PRTest root folder
  before retrieving the artifact
@microsoft-github-policy-service microsoft-github-policy-service Bot removed Moderator-Approved One of the Moderators has reviewed and approved this PR Needs-Attention This work item needs to be reviewed by a member of the core team. labels Sep 25, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Moderator-Approved One of the Moderators has reviewed and approved this PR label Sep 25, 2026
@denelon
Demitrius Nelon (denelon) merged commit dd6ee60 into microsoft:master Sep 26, 2026
31 checks passed
@Trenly
Kaleb Luedtke (Trenly) deleted the copilot/prtest-no-checkout-artifact branch September 26, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Moderator-Approved One of the Moderators has reviewed and approved this PR Project-File The pull request modifies repository project or configuration files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants