Skip to content

fix: change to http_list for some ProjectCommit methods #1809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2022

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Jan 6, 2022

Fix the type-hints and use http_list() for the ProjectCommits methods:

  • diff()
  • merge_requests()
  • refs()

This will enable using the pagination support we have for lists.

Closes: #1805
Closes: #1231

@JohnVillalovos JohnVillalovos requested a review from nejch January 6, 2022 01:25
@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2022

Codecov Report

Merging #1809 (8b4f500) into main (a349793) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1809   +/-   ##
=======================================
  Coverage   92.02%   92.02%           
=======================================
  Files          76       76           
  Lines        4790     4791    +1     
=======================================
+ Hits         4408     4409    +1     
  Misses        382      382           
Flag Coverage Δ
cli_func_v4 81.38% <50.00%> (+<0.01%) ⬆️
py_func_v4 80.21% <100.00%> (+<0.01%) ⬆️
unit 83.19% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/v4/objects/commits.py 94.73% <100.00%> (+0.07%) ⬆️
gitlab/v4/objects/services.py 100.00% <0.00%> (ø)

@nejch
Copy link
Member

nejch commented Jan 8, 2022

@JohnVillalovos I'd say this is a proper fix and not a chore especially as it fixes that older issue as well, could you change the commit message so we can trigger a fix release?

Fix the type-hints and use `http_list()` for the ProjectCommits methods:
   - diff()
   - merge_requests()
   - refs()

This will enable using the pagination support we have for lists.

Closes: #1805
Closes: #1231
@JohnVillalovos JohnVillalovos changed the title chore: fix type-hints for ProjectCommit methods fix: change to http_list for some ProjectCommit methods Jan 8, 2022
@JohnVillalovos
Copy link
Member Author

@JohnVillalovos I'd say this is a proper fix and not a chore especially as it fixes that older issue as well, could you change the commit message so we can trigger a fix release?

Done!

@nejch nejch enabled auto-merge January 8, 2022 20:28
@nejch nejch merged commit d45b59e into main Jan 8, 2022
@nejch nejch deleted the jlvillal/list_api branch January 8, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants