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
When trying to get all the commits on a branch I get an attribute error.
Code:
from azure.devops.connection import Connection
from azure.devops.v7_0.git import GitClient
from azure.devops.v7_0.git.models import GitQueryCommitsCriteria
from msrest.authentication import BasicAuthentication
Results:
Traceback (most recent call last):
File "C:\PythonWork\Tool Connectivity\ADO_ALL_REPOS_BRANCHES_COMMITS.py", line 66, in
commits = git_client.get_commits(
repo_name,
project=project_name,
search_criteria=cm_search_criteria
)
File "C:\Users\tmoran\AppData\Local\Programs\Python\Python313\Lib\site-packages\azure\devops\v7_0\git\git_client_base.py", line 361, in get_commits
if search_criteria.item_version.version_type is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'version_type'
I cannot see anything wrong with the code, but it is throwing an error, does any one see an error?