Kir-Antipov/mc-publish

[Bug] Modrinth url links to wrong version

Opened this issue · 1 comments

Description

If you upload multiple versions at the same time with the same version number modrinth will generate a different url for it if one is already using it.

Ie. https://modrinth.com/mod/heracles/version/NcH63TrF and https://modrinth.com/mod/heracles/version/1.1.8

The version number is already useds so if you try to get the modrinth url for 1 upload after another it will return the same one.

Expected Behavior

It should return a unique url for that upload.

Actual Behavior

The url only uses the version number and therefore is not unique per upload.

Version

v3.3.0

Environment

GitHub Actions

Configuration

No response

Logs

No response

Other Information

It can be fixed by using the version id instead of the version number as the version id is unique per upload while version number can be used on multiple uploads.

If you upload multiple versions at the same time with the same version number

I was not aware that this was allowed. For some reason, I assumed that Modrinth requires version numbers to be unique within the context of their respective projects. Thus, I opted for more human-friendly URLs instead of ones that use IDs.

Thank you for notifying me!