From e24102f2964c2035fff948a736a97108d000ba33 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 16 May 2024 16:36:21 +0800 Subject: [PATCH] fix: sonarqube nextPageToken always empty (#7477) --- backend/plugins/sonarqube/api/remote_api.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/plugins/sonarqube/api/remote_api.go b/backend/plugins/sonarqube/api/remote_api.go index 167925a7f3f..704cdabf5e7 100644 --- a/backend/plugins/sonarqube/api/remote_api.go +++ b/backend/plugins/sonarqube/api/remote_api.go @@ -82,6 +82,13 @@ func querySonarqubeProjects( }) } + if resBody.Paging.Total > resBody.Paging.PageIndex*resBody.Paging.PageSize { + nextPage = &SonarqubeRemotePagination{ + Page: resBody.Paging.PageIndex + 1, + PageSize: resBody.Paging.PageSize, + } + } + return }