From d7471e2533a043c737d4c49129958d458721278a Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 2 Jul 2020 01:38:03 +0200 Subject: [PATCH] Fix PR number acquisition. --- src/gitea.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gitea.cpp b/src/gitea.cpp index bf257d2..d750d2e 100644 --- a/src/gitea.cpp +++ b/src/gitea.cpp @@ -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(); + _last_pr_number = json.front().back()["number"].get(); } return _last_pr_number;