Renamed _get_attributes to _get and implemented for Item.

This commit is contained in:
2025-11-03 00:00:38 +01:00
parent d8674462df
commit 53e1ae186e
2 changed files with 32 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
from devops import Organization, Project, Repository, DEVOPS_SCOPE
from devops import Organization, Project, Repository, Item, DEVOPS_SCOPE
from azure.identity import DefaultAzureCredential
from json import dumps
@@ -30,3 +30,11 @@ print(f"Listing items in the {repo.name} repository:")
for item in repo.items:
print(f"{item.path} ({item.git_object_type}): {item.commit_id}")
print()
print("Getting specific item details:")
item = Item(repo, path="/generate-pat.py")
print(f"Item path: {item.path}")
print(f"Item type: {item.git_object_type}")
print(f"Item commit ID: {item.commit_id}")
print(f"Item URL: {item.url}")
print()