Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Submit package using wingetcreate
run: |
# Set the package ID based on the release info
$packageId = if (${{ !github.event.release.prerelease }}) { "GitHub.Copilot" } else { "GitHub.Copilot.Prerelease" }
$packageId = if ('${{ !github.event.release.prerelease }}' -eq 'true') { 'GitHub.Copilot' } else { 'GitHub.Copilot.Prerelease' }
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The double negation in this condition makes the logic harder to follow. Since github.event.release.prerelease already indicates whether it's a prerelease, the negation operator ! adds unnecessary complexity. Consider checking if the value equals 'false' directly instead of checking if the negated value equals 'true'. This would make the condition more straightforward and easier to understand.

Suggested change
$packageId = if ('${{ !github.event.release.prerelease }}' -eq 'true') { 'GitHub.Copilot' } else { 'GitHub.Copilot.Prerelease' }
$packageId = if ('${{ github.event.release.prerelease }}' -eq 'false') { 'GitHub.Copilot' } else { 'GitHub.Copilot.Prerelease' }

Copilot uses AI. Check for mistakes.

# Get installer info from release event
$assets = '${{ toJSON(github.event.release.assets) }}' | ConvertFrom-Json
Expand Down