Renamed _get_attributes to _get and implemented for Item.
This commit is contained in:
10
harvester.py
10
harvester.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user