|
|
|
@ -51,13 +51,12 @@ void source_package_publishing_history::parse_json(const std::string& json_data)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::vector<build> source_package_publishing_history::getBuilds() const {
|
|
|
|
|
std::vector<build> builds;
|
|
|
|
|
if (self_link.empty()) { return builds; }
|
|
|
|
|
std::generator<build> source_package_publishing_history::getBuilds() const {
|
|
|
|
|
if (self_link.empty()) { co_return; }
|
|
|
|
|
|
|
|
|
|
std::map<std::string, std::string> params = {{"ws.op", "getBuilds"}};
|
|
|
|
|
auto response = lp->api_get(self_link, params);
|
|
|
|
|
if (!response.has_value()) { return builds; }
|
|
|
|
|
if (!response.has_value()) { co_return; }
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
auto data = nlohmann::json::parse(response.value());
|
|
|
|
@ -66,14 +65,12 @@ std::vector<build> source_package_publishing_history::getBuilds() const {
|
|
|
|
|
auto b_opt = build::parse(entry.dump());
|
|
|
|
|
if(!b_opt.has_value()) continue;
|
|
|
|
|
b_opt->set_lp(lp);
|
|
|
|
|
builds.push_back(b_opt.value());
|
|
|
|
|
co_yield b_opt.value();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (const std::exception& e) {
|
|
|
|
|
std::cerr << "Error parsing builds: " << e.what() << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return builds;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void source_package_publishing_history::set_lp(launchpad* lp_ptr) {
|
|
|
|
|