Description of the problem, including code/CLI snippet
The documentation for GitLab API states that it is possible to filter all commits that affect a specific file by specifying path parameter:
https://docs.gitlab.com/ee/api/commits.html (List repository commits section)
This is however not possible when doing:
commits = project.commits.list(path='test.py')
since the path parameter is reserved to override url path in mixins.py's def list(self, **kwargs: Any):
# Allow to overwrite the path, handy for custom listings
path = data.pop("path", self.path)
Expected Behavior
It should be possible to filter commits by path parameter
Actual Behavior
The path parameter is popped from query params and used in the url path instead
Specifications
- python-gitlab version: 3.14.0
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): 16.0
Description of the problem, including code/CLI snippet
The documentation for GitLab API states that it is possible to filter all commits that affect a specific file by specifying
pathparameter:https://docs.gitlab.com/ee/api/commits.html (List repository commits section)
This is however not possible when doing:
commits = project.commits.list(path='test.py')since the
pathparameter is reserved to override url path in mixins.py'sdef list(self, **kwargs: Any):Expected Behavior
It should be possible to filter commits by
pathparameterActual Behavior
The
pathparameter is popped from query params and used in the url path insteadSpecifications