Added ability to specify the Organization object or ogranization name for harvest_readmes function.
All checks were successful
/ unit-tests (push) Successful in 52s
All checks were successful
/ unit-tests (push) Successful in 52s
This commit is contained in:
@@ -15,9 +15,12 @@ def sanitize_name(name: str) -> str:
|
||||
"""Sanitize a name to be filesystem-friendly."""
|
||||
return name.lower().replace(" ", "-").replace("_", "-")
|
||||
|
||||
def harvest_readmes(organization: str, branch: list[str | None] = ["main", "dev", None], projects: list[str] = [], output_path: str = "reference") -> None:
|
||||
def harvest_readmes(organization: str | Organization, branch: list[str | None] = ["main", "dev", None], projects: list[str] = [], output_path: str = "reference") -> None:
|
||||
"""Harvest README files from repositories."""
|
||||
if isinstance(organization, str):
|
||||
org = Organization("https://dev.azure.com/" + organization, token=get_token())
|
||||
else:
|
||||
org = organization
|
||||
|
||||
if projects:
|
||||
# Target specific projects
|
||||
|
||||
Reference in New Issue
Block a user