Reegineered entity reading logic.

This commit is contained in:
2025-11-02 23:34:13 +01:00
parent b7bb29224f
commit 17bd314a20
2 changed files with 45 additions and 40 deletions

View File

@@ -9,15 +9,19 @@ org = Organization("https://dev.azure.com/mcovsandbox", DefaultAzureCredential()
# Listing projects in the organization
print("Projects in the organization:")
for project in org.projects:
print(f"- {project.name} (ID: {project._id})")
print(f"- {project.name} (ID: {project.id})")
ado_sandbox = Project(org, id="bafe0cf1-6c97-4088-864a-ea6dc02b2727")
repo = Repository(ado_sandbox, id_or_name="ado-auth-lab")
print(f"Listing repositories in project: {ado_sandbox.name}")
for repo in ado_sandbox.repositories:
print(f"- {repo.name} (ID: {repo.id})")
repo = Repository(ado_sandbox, id="ado-auth-lab")
print(str(repo))
print(f"Repository name: {repo.name} and URL: {repo.web_url}")
repo = Repository(ado_sandbox, id_or_name="feac266f-84d2-41bc-839b-736925a85eaa")
repo = Repository(ado_sandbox, id="feac266f-84d2-41bc-839b-736925a85eaa")
print(str(repo))
print(f"Repository name: {repo.name} and URL: {repo.web_url}")