-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Description
I want to get all builds for a specific commit but using the following code results in an exception:
gl = gitlab.Gitlab(url, ssl_verify=False, private_token=api_token)
commit = gl.project_commits.get(sha, project_id)
builds = commit.builds(all=True)
Exception:
builds = commit.builds(all=True)
File "C:\Users\rup\AppData\Local\Programs\Python\Python35-32\lib\site-packages\gitlab\objects.py", line 1354, in builds
**kwargs)
File "C:\Users\rup\AppData\Local\Programs\Python\Python35-32\lib\site-packages\gitlab\__init__.py", line 340, in _raw_list
results.extend(self.list(cls, **args))
File "C:\Users\rup\AppData\Local\Programs\Python\Python35-32\lib\site-packages\gitlab\__init__.py", line 391, in list
", ".join(missing))
gitlab.exceptions.GitlabListError: Missing attribute(s): project_id
Am I doing something wrong?
To get the job done I currently use the following workaround (The commit has less than 1000 builds):
builds = commit.builds(page=1, per_page=1000)
Metadata
Metadata
Assignees
Labels
No labels