Skip to content

Fix: DownloadRelease incorrectly matches release assets from projects with the same name prefix#2311

Draft
spetersenms with Copilot wants to merge 2 commits into
mainfrom
copilot/bug-fix-locating-release-assets
Draft

Fix: DownloadRelease incorrectly matches release assets from projects with the same name prefix#2311
spetersenms with Copilot wants to merge 2 commits into
mainfrom
copilot/bug-fix-locating-release-assets

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

When locating previous release assets, the glob pattern logis-interface-*-Apps-*.zip matched assets from logis-interface-2-core-library because * spans hyphens. This caused unrelated projects' apps to be used as the previous release baseline.

Fix

DownloadRelease in Actions/Github-Helper.psm1 already uses regex patterns with [^-]+ for the branch segment instead of glob wildcards:

# Old (glob): logis-interface-*-Apps-*.zip  ← matches logis-interface-2-core-library-main-Apps-*.zip
# New (regex): ^logis-interface-[^-]+-Apps-.+\.zip$  ← stops at first hyphen, no false match

[^-]+ prevents the branch segment from spanning hyphen-separated project name components, so logis-interface-[^-]+-Apps-.+\.zip$ correctly rejects logis-interface-2-core-library-main-Apps-1.0.64.0.zip.

Tests

Added regression tests in Tests/GitHub-Helper.Test.ps1 covering:

  • logis-interface downloads only its own assets, not logis-interface-2-core-library assets (the reported scenario)
  • logis-interface-2-core-library resolves its own assets independently
  • Wildcard * project still matches all assets
  • Legacy Pattern-2 format (no branch in asset name) still works

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)
  • Add telemetry

Copilot AI changed the title [WIP] Fix issue with locating release assets for similar project names Fix: DownloadRelease incorrectly matches release assets from projects with the same name prefix Jul 9, 2026
Copilot AI requested a review from spetersenms July 9, 2026 10:27
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.

[Bug]: Locating previous release also finds release assets of projects with the same name root

2 participants