Get the newest PRs when looking up the last PR number.
continuous-integration/drone/push Build is passing Details

What was I thinking? 🤦
This commit is contained in:
tastytea 2020-10-17 08:31:28 +02:00
parent 852711f1ec
commit 2ecfeba803
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -157,13 +157,13 @@ uint64_t get_last_pr_number()
{
const auto answer{api_request(http_method::GET,
"/api/v1/repos/FediBlock/data/pulls",
"?sort=oldest")};
"?sort=newest&limit=1")};
if (answer == "[]")
{
return 0;
}
const auto json{nlohmann::json::parse(answer)};
_last_pr_number = json.front().back()["number"].get<uint64_t>();
_last_pr_number = json.front().front()["number"].get<uint64_t>();
}
return _last_pr_number;