Skip to content

Address PR #43 review-thread feedback on warning handling, docs, and release version bump#44

Open
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-comments-in-review-thread
Open

Address PR #43 review-thread feedback on warning handling, docs, and release version bump#44
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-comments-in-review-thread

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown

This PR applies all requested fixes from the linked review thread, focused on warning propagation behavior, documentation typos/clarity, and release workflow correctness after script header changes.

  • PowerShell warning handling (sources/WingetIntunePackager.ps1)

    • Ensures popup warning content is rendered as actual text (not System.Object[]) by joining captured warnings before display.
    • Adjusts Add-IntuneWin32App warning capture to avoid duplicate/default emission and re-emits each warning exactly once.
  • README prerequisites wording (README.md)

    • Corrects review-flagged typos (registration, registrations, Leave).
    • Updates wording for the Entra registration step to the clearer “Leave … set to …” phrasing.
    • Aligns example app name casing with the project name.
  • Release automation line targeting (.github/workflows/Create_New_Version.yml)

    • Updates the version-bump sed line index from 12 to 14 so workflow updates the correct $Script:WingetIntunePackager assignment after the added #Requires line.
Add-IntuneWin32App @Win32AppArgs -WarningVariable warning -WarningAction SilentlyContinue
$warning | ForEach-Object {
    Write-Warning $_
}

Copilot AI changed the title [WIP] Fix code based on review comments Address PR #43 review-thread feedback on warning handling, docs, and release version bump Jun 10, 2026
Copilot AI requested a review from Romanitho June 10, 2026 09:30
@Romanitho Romanitho marked this pull request as ready for review June 10, 2026 09:37
Copilot AI review requested due to automatic review settings June 10, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown

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 addresses prior review feedback by refining warning propagation/visualization in the PowerShell GUI flow, improving README prerequisite instructions, and updating the release workflow’s version-bump targeting after script header shifts.

Changes:

  • Updates WingetIntunePackager.ps1 to improve GUI connection validation, warning capture/display behavior, and a few robustness tweaks (icon download, module detection).
  • Adds/clarifies README prerequisites for Entra app registration.
  • Adjusts the release workflow’s version-bump sed target to align with the shifted version assignment line.

Reviewed changes

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

File Description
sources/WingetIntunePackager.ps1 Adds desktop PowerShell requirement, improves GUI validation and warning capture/display, and hardens a few web/icon/module checks.
README.md Adds a prerequisites section describing Entra app registration steps more clearly.
.github/workflows/Create_New_Version.yml Updates the version-bump step to target the new script version line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +288 to +308
Invoke-IntunePackage $Win32AppArgs -WarningVariable warning

if ([string]::IsNullOrEmpty($warning)) {
$AppInfo = @()
$SearchTextBox.Text = ""
$IDComboBox.Text = ""
$IDComboBox.Items.Clear()
$VersionTextBox.Text = ""
$OverrideTextBox.Text = ""
$IntuneDescriptionTextBox.Text = ""
$WhitelistCheckbox.IsChecked = $false
$AllowUninstallCheckbox.IsChecked = $false
$InstallUserContextCheckbox.IsChecked = $false
$CreateButton.IsEnabled = $false
$AppIcon.Source = $null
Close-PopUp
}

if (-not [string]::IsNullOrEmpty($warning)) {
Start-PopUp ($warning -join "`n")
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit. Both checks now use PowerShell truthiness (if (-not $warning) / if ($warning)), and @($warning) -join is used to safely handle arrays of warning messages.

Comment on lines +41 to +43
- name: Update Powershell Version
#Replace line 12 with new version
run: sed -i '12s/.*/$Script:WingetIntunePackager = "${{ steps.versioning.outputs.version }}"/g' sources/WingetIntunePackager.ps1
#Replace line 14 with new version
run: sed -i '14s/.*/$Script:WingetIntunePackager = "${{ steps.versioning.outputs.version }}"/g' sources/WingetIntunePackager.ps1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit. The sed command now matches the $Script:WingetIntunePackager variable name pattern rather than a hard-coded line number, so it stays correct regardless of file layout changes.

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