Skip to content

Use releaseTag with fallback to downloadUrl in updates.xml#3713

Merged
christophwille merged 5 commits into
masterfrom
christophwille/UpdateUrlViaReleaseTag
Apr 11, 2026
Merged

Use releaseTag with fallback to downloadUrl in updates.xml#3713
christophwille merged 5 commits into
masterfrom
christophwille/UpdateUrlViaReleaseTag

Conversation

@christophwille

@christophwille christophwille commented Apr 8, 2026

Copy link
Copy Markdown
Member

See #3707

Would need modification to

<downloadUrl>https://github.com/icsharpcode/ILSpy/releases/tag/v10.0</downloadUrl>
to include releaseTag.

  • releaseTag takes precedence over downloadUrl
  • URLs from both of those inputs must conform to a specific base url (mitigate path traversal attempts and downloads from non-sanctioned sites)

@christophwille
christophwille marked this pull request as ready for review April 8, 2026 10:03
@christophwille
christophwille requested a review from Copilot April 8, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates ILSpy’s update-check parsing to support a new releaseTag field in updates.xml (per #3707), enabling update links to be constructed from GitHub release tags with a fallback to the legacy downloadUrl.

Changes:

  • Add support for <releaseTag> in UpdateService, constructing a GitHub releases/tag URL and falling back to <downloadUrl> when missing.
  • Refactor update fetching to allow dependency injection of HttpClient/URL for testing.
  • Add NUnit tests covering releaseTag behavior and wire the new test file into the test project.

Reviewed changes

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

File Description
ILSpy/Updates/UpdateService.cs Parses releaseTag and builds the GitHub tag URL; adds injectable overload for testability.
ILSpy.Tests/UpdateServiceTests.cs Adds unit tests validating releaseTag handling and fallback behavior.
ILSpy.Tests/ILSpy.Tests.csproj Includes the new test file in the explicit compile item list.

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

Comment thread ILSpy/Updates/UpdateService.cs
Comment thread ILSpy/Updates/UpdateService.cs Outdated
@christophwille
christophwille merged commit b5fc0d5 into master Apr 11, 2026
10 of 11 checks passed
@christophwille
christophwille deleted the christophwille/UpdateUrlViaReleaseTag branch April 11, 2026 10:55
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