Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix all kwarg behaviour#701

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpocentek merged 1 commit intopython-gitlab:masterfromjpiron:fix_all_behaviour
Feb 20, 2019

Conversation

jpiron
Copy link

all kwarg is used to manage GitlabList generator behaviour.
However, as it is not pop'ed from kwargs, it is sent to Gitlab API.
Some endpoints such asthe project commits one,
support aall attribute.
This means a call likeproject.commits.list(all=True, ref_name='master')
won't return all the master commits as one might expect but all the
repository's commits.
To prevent confusion, the same kwarg shouldn't be used for 2 distinct
purposes.
Moreover according tothe documentation,
theall project commits API endpoint attribute doesn't seem supported.

`all` kwarg is used to manage GitlabList generator behaviour.However, as it is not poped from kwargs, it is sent to Gitlab API.Some endpoints such as [the project commits](https://docs.gitlab.com/ee/api/commits.html#list-repository-commits) one,support a `all` attribute.This means a call like `project.commits.list(all=True, ref_name='master')`won't return all the master commits as one might expect but all therepository's commits.To prevent confusion, the same kwarg shouldn't be used for 2 distinctpurposes.Moreover according to [the documentation](https://python-gitlab.readthedocs.io/en/stable/gl_objects/commits.html#examples),the `all` project commits API endpoint attribute doesn't seem supported.
@max-wittig
Copy link
Member

max-wittig commentedFeb 18, 2019
edited
Loading

Makes sense. To use theall parameter, you can supply it withquery_parameters instead (starting with 1.8)

@max-wittig
Copy link
Member

@gpocentek We may need to update the documentation thatall is not send to the GitLab API anymore by default. What do you think?

@gpocentek
Copy link
Contributor

@max-wittig yes, we need to add that info in the release notes

@max-wittig
Copy link
Member

@gpocentek Could you disable the travis requirement temporary to merge this?

@gpocentekgpocentek merged commit8ce4e9e intopython-gitlab:masterFeb 20, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@max-wittigmax-wittigmax-wittig approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jpiron@max-wittig@gpocentek

[8]ページ先頭

©2009-2025 Movatter.jp