Repository navigation
Add GitHub CLI and Copilot CLI updates to Update-AllTheThings - #231
Conversation
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
Add read-only pull request validation, deterministic dependency locking, current action pins, deployment guards, caching, and job timeouts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3b91424a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved standalone telemetry and WinGet safety-gating issues, along with confirmation-path concerns, block approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Extends Update-AllTheThings to update GitHub CLI tools, strengthen WinGet safeguards, and synchronize scripts, documentation, and tests.
Changes:
- Adds optional
ghextension and Copilot CLI updates. - Adds CIM/WMI OS detection and unattended Windows Server safeguards.
- Updates packaged scripts, metadata, documentation, and regression coverage.
File summaries
| File | Summary |
|---|---|
src/Tests/Unit/Update-AllTheThings.Tests.ps1 |
Adds CLI and safeguard regression tests. |
src/PSPreworkout/Public/Update-AllTheThings.ps1 |
Adds CLI update logic and WinGet safeguards. |
src/PSPreworkout/Public/Test-IsElevated.ps1 |
Corrects Unix group detection. |
Scripts/Update-AllTheThings.ps1 |
Regenerated standalone published script. |
Scripts/Update-AllTheThings_ScriptInfo.ps1 |
Updates script metadata. |
docs/Update-AllTheThings.md |
Updates documentation and related links. |
Review details
Suppressed comments (3)
Scripts/Update-AllTheThings.ps1:386
- The packaged copy repeats the same gating problem: when
-AcceptPrompts,-Confirm:$false, or built-in confirmation handling suppresses the custom prompt, CIM/WMI detection is not attempted and WinGet can run with an unknown OS caption. Keep OS detection and the safety skip independent from the decision to show the interactive server prompt.
$NeedServerPrompt = $WinGetCommand -and (-not $SkipWinGet) -and (-not $SkipServerPrompt) -and (-not $ShouldProcessHandlesConsent)
src/PSPreworkout/Public/Update-AllTheThings.ps1:329
Get-HostChoiceis not a PSPreworkout command; this test hook is now part of the production confirmation path. If a caller has any function or cmdlet with that name, it replaces$Host.UI.PromptForChoiceand can return an unexpected value or bypass the Windows Server safety prompt. Keep production code on the host API and inject/mock the prompt without resolving an arbitrary caller command.
if (Get-Command -Name 'Get-HostChoice' -ErrorAction SilentlyContinue) {
$Result = Get-HostChoice -Title $Title -Message $Message -Options $Options -DefaultChoice 1
} else {
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, 1)
src/PSPreworkout/Public/Update-AllTheThings.ps1:284
- The OS-caption safety check is gated by
$NeedServerPrompt, so it is skipped when-AcceptPrompts,-Confirm:$false, or a standardShouldProcessconfirmation is used. If both CIM and WMI are unavailable in any of those modes,$ShouldUpdateWinGetcan still be true and WinGet runs despite the stated safety requirement to skip when the OS cannot be determined. Separate OS detection from whether the interactive server-choice prompt is needed.
$NeedServerPrompt = $WinGetCommand -and (-not $SkipWinGet) -and (-not $SkipServerPrompt) -and (-not $ShouldProcessHandlesConsent)
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdd2065383
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Extract platform and native-command seams, split the Pester suite by responsibility, add cross-version CI coverage, and make standalone packaging deterministic. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Extract package-manager and PowerShell update stages into focused private helpers, centralize progress and native command handling, and expand cross-version Pester coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The standalone script still invokes a module-private telemetry helper through its bundled elevation function.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Balanced
Emit deterministic CRLF output to match the repository PowerShell line-ending policy and keep byte-parity checks stable across CI hosts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Suppress the analyzer false positive on the public orchestrator because confirmation is forwarded to private helpers, and cover the contract in Pester. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update-AllTheThingsdid not update installed GitHub CLI extensions or the GitHub Copilot CLI even when those tools were present. This change adds those update paths and keeps the existing Windows/WinGet safety behavior aligned with non-interactive usage.CLI updater coverage
gh extension upgrade --allcopilot updateShouldProcessbehavior stay consistentWindows / WinGet safeguard tightening
-WhatIf-Confirm:$falseand-AcceptPromptsfor unattended runsPublished script + docs parity
Scripts/Update-AllTheThings.ps1Behavioral regression coverage
ghpresent / absentcopilotpresent / absentWhatIfsuppressing CLI execution