Skip to content

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

Open
christophwille wants to merge 5 commits intomasterfrom
christophwille/UpdateUrlViaReleaseTag
Open

Use releaseTag with fallback to downloadUrl in updates.xml#3713
christophwille wants to merge 5 commits intomasterfrom
christophwille/UpdateUrlViaReleaseTag

Conversation

@christophwille
Copy link
Copy Markdown
Member

@christophwille christophwille commented Apr 8, 2026

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

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.

2 participants