|
|
|
@ -51,14 +51,7 @@ void build::parse_json(const std::string& json_data) {
|
|
|
|
|
{"can_be_cancelled", [this](const nlohmann::json& val) { can_be_cancelled = val.get<bool>(); }},
|
|
|
|
|
{"can_be_retried", [this](const nlohmann::json& val) { can_be_retried = val.get<bool>(); }},
|
|
|
|
|
{"title", [this](const nlohmann::json& val) { title = val.get<std::string>(); }},
|
|
|
|
|
{"self_link", [this](const nlohmann::json& val) {
|
|
|
|
|
self_link = val.get<std::string>();
|
|
|
|
|
std::regex rgx("/builds/(\\d+)");
|
|
|
|
|
std::smatch match;
|
|
|
|
|
if (std::regex_search(self_link, match, rgx)) {
|
|
|
|
|
id = std::stol(match[1]);
|
|
|
|
|
}
|
|
|
|
|
}},
|
|
|
|
|
{"self_link", [this](const nlohmann::json& val) { self_link = val.get<std::string>(); }},
|
|
|
|
|
{"build_log_url", [this](const nlohmann::json& val) { build_log_url = val.get<std::string>(); }},
|
|
|
|
|
{"upload_log_url", [this](const nlohmann::json& val) { upload_log_url = val.get<std::string>(); }},
|
|
|
|
|
{"duration", [this](const nlohmann::json& val) { duration = val.get<std::string>(); }},
|
|
|
|
|