ogri-la / strongbox

a World of Warcraft Addon Manager aimed at Linux players
GNU Affero General Public License v3.0
169 stars 7 forks source link

Strongbox doesn't support the MythicDungeonTools Releases #366

Closed Iggle closed 2 years ago

Iggle commented 2 years ago

Describe the bug The MythicsDungeonTools Repository does Release Tagging just fine, but the "assets" section in the API is empty. Under Github, an asset zip file shows up fine. If passed to strongbox.zip/valid-addon-zip-file?, strongbox is happy with the structure.

To Reproduce Steps to reproduce the behavior. For example:

  1. Go to 'File->Import Addon'
  2. Input the MDT URL
  3. Click on OK

Expected behavior Zipfile should be downloaded from archive/refs/tags/<semver>

Additional context A MDT Release looks like this in strongbox.github-api/download-release-listing:

{:html_url "https://github.com/Nnoggie/MythicDungeonTools/releases/tag/v3.9.3",
  :upload_url "https://uploads.github.com/repos/Nnoggie/MythicDungeonTools/releases/67297430/assets{?name,label}",
  :assets [],
  :name "v3.9.3",
  :node_id "RE_kwDOB1Ar184EAuCW",
  :published_at "2022-05-19T16:07:22Z",
  :author
  {:html_url "https://github.com/Nnoggie",
   :gravatar_id "",
   :followers_url "https://api.github.com/users/Nnoggie/followers",
   :subscriptions_url "https://api.github.com/users/Nnoggie/subscriptions",
   :site_admin false,
   :following_url "https://api.github.com/users/Nnoggie/following{/other_user}",
   :node_id "MDQ6VXNlcjI3ODE5NTEy",
   :type "User",
   :received_events_url "https://api.github.com/users/Nnoggie/received_events",
   :login "Nnoggie",
   :organizations_url "https://api.github.com/users/Nnoggie/orgs",
   :id 27819512,
   :events_url "https://api.github.com/users/Nnoggie/events{/privacy}",
   :url "https://api.github.com/users/Nnoggie",
   :repos_url "https://api.github.com/users/Nnoggie/repos",
   :starred_url "https://api.github.com/users/Nnoggie/starred{/owner}{/repo}",
   :gists_url "https://api.github.com/users/Nnoggie/gists{/gist_id}",
   :avatar_url "https://avatars.githubusercontent.com/u/27819512?v=4"},
  :tag_name "v3.9.3",
  :draft false,
  :id 67297430,
  :prerelease false,
  :assets_url "https://api.github.com/repos/Nnoggie/MythicDungeonTools/releases/67297430/assets",
  :url "https://api.github.com/repos/Nnoggie/MythicDungeonTools/releases/67297430",
  :target_commitish "master",
  :zipball_url "https://api.github.com/repos/Nnoggie/MythicDungeonTools/zipball/v3.9.3",
  :body
  "- Added Efficiency Score to pull tooltips\r\n- Tazavesh Streets: Added missing encrypted relics to Frenzied Nightclaw Pack\r\n- affix update",
  :tarball_url "https://api.github.com/repos/Nnoggie/MythicDungeonTools/tarball/v3.9.3",
  :created_at "2022-05-19T16:06:47Z"}
torkus commented 2 years ago

hey @Iggle , thanks for opening a ticket (you have a great avatar ;)

Yes, you're correct, Strongbox doesn't support MythicDungeonTools because it doesn't upload assets to their tagged releases.

Under Github, an asset zip file shows up fine.

Github will automatically create a .tar.gz and a .zip for each tagged revision, which is what you see here:

Screenshot at 2022-06-19 10-52-59

But Github doesn't consider these assets. It calls them tarballs and zipballs, but not assets [in the API].

Further, the folder structure of these zipballs can't be used because the folder name Github uses to bundle the files up contains the tag value:

Screenshot at 2022-06-19 11-01-37

Also, some addons also need a pre-processing of the addon files before creating a release as often there are templates to be rendered or files to be generated.

As of Strongbox 5.2.0 you can download the zip file and use File -> Install addon from file but it (probably) won't be matched against a catalogue and won't know where to go to find updates. If in the future MDT start uploading assets to their Github releases and we add MDT to the Github catalogue, then an addon installed this way may automatically find a match and start receiving updates.

I would recommend you open a ticket on MDT and ask them to modify their development workflow to include uploading assets to Github when they do a release.

If MDT start uploading assets, feel free to mention it on the Github catalogue ticket: https://github.com/layday/github-wow-addon-catalogue/issues/4

Hope this helps.