Skip to content
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b2f5c27
added changes for squad mapping
a0x1ab Mar 15, 2026
e5d6000
Merge branch 'Azure:dev' into dev
a0x1ab Mar 16, 2026
dc3413e
added changes per suggestion
a0x1ab Mar 16, 2026
6658691
Merge branch 'dev' of https://github.com/a0x1ab/azure-cli into dev
a0x1ab Mar 16, 2026
83a4013
Merge branch 'Azure:dev' into dev
a0x1ab Mar 17, 2026
c328cdd
updated parsing file
a0x1ab Mar 17, 2026
d8dda2e
Merge branch 'dev' of https://github.com/a0x1ab/azure-cli into dev
a0x1ab Mar 17, 2026
62d4592
updated parse squad mapping list script
a0x1ab Mar 20, 2026
c007286
Merge branch 'Azure:dev' into dev
a0x1ab Mar 20, 2026
9f14a20
Merge branch 'Azure:dev' into dev
a0x1ab Mar 23, 2026
40b45b0
added changes to mention teams, change assignment to reviewer for squads
a0x1ab Mar 23, 2026
1151cc7
Merge branch 'Azure:dev' into dev
a0x1ab Mar 23, 2026
264db8d
fix small errors in indentation
a0x1ab Mar 24, 2026
cb81937
Merge branch 'dev' of https://github.com/a0x1ab/azure-cli into dev
a0x1ab Mar 24, 2026
1255760
Merge branch 'Azure:dev' into dev
a0x1ab Mar 24, 2026
0784be5
Merge branch 'Azure:dev' into dev
a0x1ab Mar 25, 2026
e337455
Merge branch 'Azure:dev' into dev
a0x1ab Mar 27, 2026
9980b84
Added new rules to resourceManagemnt.yml
a0x1ab Mar 27, 2026
542986e
Merge branch 'Azure:dev' into dev
a0x1ab Mar 30, 2026
4576d81
added new issues ruleset
a0x1ab Mar 30, 2026
4939d37
Merge branch 'dev' of https://github.com/a0x1ab/azure-cli into dev
a0x1ab Mar 30, 2026
2bdfeab
Merge branch 'Azure:dev' into dev
a0x1ab Mar 31, 2026
469eaaf
updated mentionee logic
a0x1ab Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions tools/Github/ParseSquadMappingList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ function TryParseLabelValue {
return $null
}

function NormalizeMentioneeValue {
[CmdletBinding()]
param(
[string] $Mentionee
)

if ([string]::IsNullOrWhiteSpace($Mentionee)) {
return $Mentionee
}

if ($Mentionee -match '^[^/]+/[^/]+$') {
return $Mentionee
}

if ($Mentionee -match '^act-[a-z0-9-]+-squad$') {
return "Azure/$Mentionee"
}

return $Mentionee
}

function GetSquadMappingFromWiki {
[CmdletBinding()]
param(
Expand Down Expand Up @@ -360,7 +381,9 @@ function AddSquadLabelsToYaml {
if ($lineAtB -match '^\s*mentionees:\s*$') { $mentioneesIndent = $indentAtB; continue }
if ($lineAtB -match '^\s*-\s+(\S+)\s*$') {
if ($mentionItemIndent -lt 0) { $mentionItemIndent = $indentAtB }
$existingMentions[$Matches[1]] = $true
$existingMention = $Matches[1]
$existingMentions[$existingMention] = $true
$existingMentions[(NormalizeMentioneeValue -Mentionee $existingMention)] = $true
$lastMentionEnd = $b
}
}
Expand All @@ -370,8 +393,9 @@ function AddSquadLabelsToYaml {
if ($mentionItemIndent -lt 0) { $mentionItemIndent = ($mentioneesIndent -gt 0) ? $mentioneesIndent : ($listIndentLength + 4) }
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback for computing $mentionItemIndent treats $mentioneesIndent==0 as "unset" because it checks -gt 0. If a mentionees: block is ever at column 0 (valid YAML), this will choose ($listIndentLength + 4) and insert mis-indented mentionees, potentially breaking YAML parsing. Consider using -ge 0 (or initialize to $null and test for $null -ne $mentioneesIndent) so an indent of 0 is handled correctly.

Suggested change
if ($mentionItemIndent -lt 0) { $mentionItemIndent = ($mentioneesIndent -gt 0) ? $mentioneesIndent : ($listIndentLength + 4) }
if ($mentionItemIndent -lt 0) { $mentionItemIndent = ($mentioneesIndent -ge 0) ? $mentioneesIndent : ($listIndentLength + 4) }

Copilot uses AI. Check for mistakes.
$mentionInsertLines = [System.Collections.Generic.List[string]]::new()
foreach ($squadLabel in $labelsToAdd) {
if (-not $existingMentions.ContainsKey($squadLabel)) {
$mentionInsertLines.Add((" " * $mentionItemIndent) + "- $squadLabel")
$mentioneeValue = NormalizeMentioneeValue -Mentionee $squadLabel
if (-not $existingMentions.ContainsKey($mentioneeValue)) {
$mentionInsertLines.Add((" " * $mentionItemIndent) + "- $mentioneeValue")
}
}
if ($mentionInsertLines.Count -gt 0) {
Expand Down
Loading