mattermost-plugin-gitlab
mattermost-plugin-gitlab copied to clipboard
Number of Issues, Notes etc. not correct: API call responds are limited
The plugin shows in Mattermost only 20 issues, notes etc.
In my case. I have 66 Issues and 24 notes in gitlab.

But unfortunately the Plugin shows only 20 at maximum.

Same to the note list with /gitlab todo list
The problem is, that every API call is limited to 20 respond objects in default and 100 in max.
https://docs.gitlab.com/ee/api/#pagination
Could you please implement an iteration to respect all pagination sites, so that the value for issues, notes etc. are correct?
Thx a lot :)
@hanzei I would like to work on this but I don't have any visual understanding of this. (unable to setup local runtime)
@tw-ayush Thanks for taking a shot! This bug can be fixed without a local setup. The gist is that all List API calls needs to make use pagination.
@hanzei is it up for grab? I can have a look at this one. I also believe there should not be any front-end changes required.
@tw-ayush All yours! Currect, there should be no front-end changed needed.
Okay a quick question: when you call /gitlab todo it makes several call to get unreads, assignments, merged, etc. So this doesn't look like a good idea to ask the caller to pass in the page info [page number and size]. So the possible solution is to iterate over these calls multiple time unless you have all the data(read all the data from gitlab). does it sound right to you as well. Or were you thinking something else when you mentioned the solution?
@tw-ayush Exactly. The Responsehttps://pkg.go.dev/github.com/xanzy/go-gitlab#Response) send by GitLab contains information about the next page, which should be used for pagination.