You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to get page count info when calling commit.diff() #1231
Description of the problem, including code/CLI snippet
Calling commit.diff() to get diff information for a commit only return per_page items or 20 by default. It seems commit.diff() does not take either all or as_list and only pagination works, but we don't know how many page there are except by manually checking the returned list size.
Expected Behavior
Using commit.diff() should be able to give us all the diffs in a commit without having to manually checking the returned page size
@max-wittig Per this reference I don't think they have an all parameter for the diff endpoint. However since python-gitlab have its own generator mechanism (as_list=False) for paging convenience, I was thinking of adding it to the Manager for commit diffs as well?
I guess this is more like a feature request rather than a bug.
Activity
max-wittig commentedon Nov 20, 2020
Sounds like an upstream issue to me, as python-gitlab is just sending these query parameter. Have you tried it with curl as well?
hungluong5791 commentedon Nov 20, 2020
@max-wittig Per this reference I don't think they have an
allparameter for the diff endpoint. However since python-gitlab have its own generator mechanism (as_list=False) for paging convenience, I was thinking of adding it to theManagerfor commit diffs as well?I guess this is more like a feature request rather than a bug.
chore: fix type-hints for ProjectCommit methods
fix: change to `http_list` for some ProjectCommit methods