Add Azure DevOps sizing script#129
Conversation
mtellin
left a comment
There was a problem hiding this comment.
Review - Changes Requested
Script omits the work items, pipelines, and artifact feed counts described in the PR summary; the script only collects Git and TFVC repo counts and Git sizes.
🔴 Blockers
- [functionality] Script body does not match PR description -
AZURE_DEVOPS/Azure_Devops.ps1
The PR summary lists five data points: Git repos, TFVC repos, work items, pipelines, and artifact feeds. The script only collects Git repos (with size) and TFVC repos. Work item counts, pipeline counts, and artifact feed counts are absent. A reviewer running the test plan step 1 against the portal would see immediately that three of the five metrics are missing.
Fix: Add REST calls for work items (e.g. Wiql query or _apis/wit/workitems count per project), pipelines (_apis/build/definitions), and artifact feeds (_apis/packaging/feeds). Alternatively, scope the PR down to Git/TFVC only and update the description to match.
🟢 Nits
- [style] Missing newline at end of file -
AZURE_DEVOPS/Azure_Devops.ps1:50
PowerShell best practice and many editors expect a trailing newline.
Fix: Add a newline after the last Write-Host line. - [readability] Consider adding a -Organization alias for American-English callers -
AZURE_DEVOPS/Azure_Devops.ps1:1
Azure DevOps documentation uses "organization" (American spelling). Adding [Alias("Organization")] to the param would match the portal terminology.
Fix: [Parameter()][Alias("Organization")][string]
✅ What's good
- Clean SecureString → BSTR → ZeroFreeBSTR pattern correctly prevents the PAT from lingering in memory.
- Per-project TFVC error handling with Write-Verbose is appropriate — orgs with no TFVC should not surface errors.
Dimensions reviewed: functionality, security, readability, style, performance, testing, consistency
|
Thanks for the review @mtellin. This PR is a plain migration of the existing internal script — I want to keep the diff equal to the source so the migration is auditable. Two follow-ups: Blocker (work items / pipelines / artifact feeds): Updated the PR description to match the script's actual scope (Git + TFVC counts and Git size). Extending coverage to work items, pipelines, and artifact feeds is a real gap, but I'd like to confirm scope with the script owner first and track it as a separate change rather than fold it into the migration. Nit 1 (trailing newline): Fixed in the latest commit. Nit 2 ( |
|
@mtellin fixed as per the comments |
|
Approved for migration |
Summary
AZURE_DEVOPS/.organisationand apersonalAccessToken(SecureString); prompts interactively when omitted. PAT requires read scope on Code.Test plan
Notes