Fix PR number acquisition.
This commit is contained in:
parent
5c6a6414f2
commit
d7471e2533
|
@ -156,13 +156,13 @@ uint64_t get_last_pr_number()
|
|||
{
|
||||
const auto answer{api_request(http_method::GET,
|
||||
"/api/v1/repos/FediBlock/data/pulls",
|
||||
"?sort=recentupdate")};
|
||||
"?sort=oldest")};
|
||||
if (answer == "[]")
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
const auto json{nlohmann::json::parse(answer)};
|
||||
_last_pr_number = json.front().front()["number"].get<uint64_t>();
|
||||
_last_pr_number = json.front().back()["number"].get<uint64_t>();
|
||||
}
|
||||
|
||||
return _last_pr_number;
|
||||
|
|
Reference in New Issue