Skip to content

Add dogfooding scripts and workflow for PR testing#1150

Open
marshalhayes wants to merge 6 commits intoCommunityToolkit:mainfrom
marshalhayes:dogfood
Open

Add dogfooding scripts and workflow for PR testing#1150
marshalhayes wants to merge 6 commits intoCommunityToolkit:mainfrom
marshalhayes:dogfood

Conversation

@marshalhayes
Copy link
Contributor

@marshalhayes marshalhayes commented Mar 7, 2026

This PR introduces a new automated workflow and two scripts to make it easier for developers to "dogfood" NuGet packages built from a pull request.

The workflow automatically posts instructions as a comment on new PRs, and the scripts allow users to quickly download and install packages from PR build artifacts using either Bash or PowerShell.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@marshalhayes marshalhayes marked this pull request as ready for review March 7, 2026 07:43
Copilot AI review requested due to automatic review settings March 7, 2026 07:43
Copy link
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

This PR adds “dogfooding” automation to help developers test NuGet packages produced by a pull request’s CI build artifacts, via a new PR-commenting workflow and companion install scripts.

Changes:

  • Added a Bash script to download PR build artifacts (NuGet packages) and register a local NuGet source for testing.
  • Added a PowerShell script providing the same workflow for Windows/PowerShell users.
  • Added a GitHub Actions workflow that comments on PRs with copy/paste dogfooding commands.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.

File Description
eng/scripts/dogfood-pr.sh Downloads nuget-packages artifact for a PR run and installs packages into a local “hive”, then configures a NuGet source.
eng/scripts/dogfood-pr.ps1 PowerShell equivalent of the Bash dogfooding script (download, install, configure source, print undo steps).
.github/workflows/dogfood-comment.yml Posts/updates a PR comment with instructions to run the dogfooding scripts.

You can also share your feedback on Copilot code review. Take the survey.

marshalhayes and others added 5 commits March 7, 2026 14:23
Use full quoted paths instead of unquoted display paths in the
printed undo commands so they work correctly when copy-pasted
on systems where paths contain spaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add guards for --run-id and --install-path to check that a value
is provided and that it doesn't look like another flag. Prevents
unbound variable errors and silent flag consumption.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add unzip to prerequisite checks
- Eliminate standalone jq dependency by using gh api --jq directly
- Replace GNU-specific grep -oP with portable sed for nuspec parsing
- Replace GNU-specific find -printf with portable find -exec basename
- Simplify configure_nuget_source() by dropping --configfile and
  letting dotnet nuget use default config resolution

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace bash-style 'rm -rf', '> $null', and '&&' with PowerShell
equivalents: Remove-Item -Recurse -Force, Out-Null, and semicolons.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep add/update behavior on dotnet's default NuGet config resolution,
but restore --configfile in the printed undo commands when the
resolved config path is known so users can undo against the same
nuget.config from any working directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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