Adding the gitlab api pagination support #2
Open
duckty wants to merge 18 commits intomonokh:masterfrom
Open
Conversation
monokh
requested changes
Jan 23, 2019
Owner
monokh
left a comment
There was a problem hiding this comment.
Thanks for contributing! I've left a few comments
src/gitlab.js
Outdated
|
|
||
| // console.log('projects', projects.length); | ||
| return projects; | ||
| } catch(e) { |
Owner
There was a problem hiding this comment.
Prefer not to swallow errors here and let it bubble up to the user
| @@ -1,34 +1,181 @@ | |||
| { | |||
Owner
There was a problem hiding this comment.
I see quite a few new libraries being added in the lock file. This shouldn't be needed, from what I see there are no new dependencies that the library requires. Could we revert this file?
Author
There was a problem hiding this comment.
I used var request = require('request-promise-native'); to get the response headers
support pagination for gitlab merge_requests and update changelog in …
support pagination for gitlab merge_requests and update changelog in …
…equests.", version pumped to `1.3.0`
Overdue can be configured for both normal and WIP merge requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gitlab api support pagination.
page | Page number (default: 1)
per_page | Number of items to list per page (default: 20)
the current app doesn't support to retrieve the project items more than 20.
ref: https://docs.gitlab.com/ee/api/README.html#pagination.
I added the pagination support for getProjects function
For next fix, I should add the pagination support for getProjectMergeRequests function too