zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

gitlab: Fix limits calculation #884

Closed prarit closed 11 months ago

prarit commented 11 months ago
The command 'lab mr list --author $author_name --state merged' was
returning a list of 100 for each engineer on a project.  Evidence in the
git tree showed that this was not the case (most had more than 100).

This was due to a calcluational error in the MRList() code.  Implement a
new algorithm that correctly returns all MRs instead of the last 100.

The same code exists in the Project Snippet and Issue list code, so fix
those as well.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
codecov[bot] commented 11 months ago

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (4622fad) 55.89% compared to head (5aff267) 55.75%.

Files Patch % Lines
internal/gitlab/gitlab.go 8.33% 20 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #884 +/- ## ========================================== - Coverage 55.89% 55.75% -0.15% ========================================== Files 83 83 Lines 6002 6014 +12 ========================================== - Hits 3355 3353 -2 - Misses 2353 2365 +12 - Partials 294 296 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.