You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "klesh (via GitHub)" <gi...@apache.org> on 2023/05/18 03:42:37 UTC

[GitHub] [incubator-devlake] klesh commented on a diff in pull request #5213: fix: Correct paging behaviour during PagerDuty service enumeration

klesh commented on code in PR #5213:
URL: https://github.com/apache/incubator-devlake/pull/5213#discussion_r1197321520


##########
backend/plugins/pagerduty/api/remote.go:
##########
@@ -302,7 +302,7 @@ func DecodeFromPageToken(pageToken string) (*PageData, errors.Error) {
 
 func GetQueryFromPageData(pageData *PageData) (url.Values, errors.Error) {
 	query := url.Values{}
-	query.Set("offset", fmt.Sprintf("%v", pageData.Page))
+	query.Set("offset", fmt.Sprintf("%v", pageData.Page*pageData.PerPage))

Review Comment:
   Does the `pageData.Page` start from `0`?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org