| 328 | } |
| 329 | |
| 330 | Vector<Pair<int64_t, int64_t>> GitHubSource::get_plugin_version_numbers(const String &plugin_name, Error &r_connection_error) { |
| 331 | auto thing = get_list_of_releases(plugin_name, r_connection_error); |
| 332 | ERR_FAIL_COND_V_MSG(r_connection_error != OK, {}, "Failed to get list of releases for plugin " + plugin_name); |
| 333 | Vector<Pair<int64_t, int64_t>> release_asset_pairs; |
| 334 | for (auto &release : thing) { |
| 335 | auto tag = release.get("tag_name", ""); |
| 336 | if (should_skip_tag(plugin_name, tag)) { |
| 337 | continue; |
| 338 | } |
| 339 | int64_t release_id = release.get("id", 0); |
| 340 | Array assets = release.get("assets", Array()); |
| 341 | for (auto &asset : assets) { |
| 342 | if (should_skip_release(plugin_name, ((Dictionary)asset).get("browser_download_url", ""))) { |
| 343 | continue; |
| 344 | } |
| 345 | int64_t asset_id = ((Dictionary)asset).get("id", 0); |
| 346 | release_asset_pairs.push_back({ release_id, asset_id }); |
| 347 | } |
| 348 | } |
| 349 | return release_asset_pairs; |
| 350 | } |
| 351 | |
| 352 | void GitHubSource::load_cache_internal() { |
| 353 | _load_release_cache(); |
no test coverage detected