This is an automated email from the ASF dual-hosted git repository. klesh pushed a commit to branch kw-jira-remote-scope-no-nextpage in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 44a252633b774ef35f9e3e643d44eda6aea07655 Author: Klesh Wong <[email protected]> AuthorDate: Fri Dec 29 17:49:20 2023 +0800 fix: jira remote scope api does not return nextPageToken --- backend/plugins/jira/api/remote_api.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/plugins/jira/api/remote_api.go b/backend/plugins/jira/api/remote_api.go index aa4212a3a..3e1e820eb 100644 --- a/backend/plugins/jira/api/remote_api.go +++ b/backend/plugins/jira/api/remote_api.go @@ -44,7 +44,7 @@ func queryJiraAgileBoards( err errors.Error, ) { if page.MaxResults == 0 { - page.MaxResults = 100 + page.MaxResults = 50 } res, err := apiClient.Get("agile/1.0/board", url.Values{ "maxResults": {fmt.Sprintf("%v", page.MaxResults)}, @@ -77,6 +77,13 @@ func queryJiraAgileBoards( }) } + if !resBody.IsLast { + nextPage = &JiraRemotePagination{ + MaxResults: page.MaxResults, + StartAt: page.StartAt + page.MaxResults, + } + } + return }
