<commit_before>[CmdletBinding()]
Param
(
    [Parameter()]
    [string]$FilesChanged
)

if ([string]::IsNullOrEmpty($FilesChanged))
{
    Write-Host "The list of files changed is empty; skipping check for change log entry"
    return
}

$PathsToCheck = @(
    "src/Common",
    "src/ResourceManager",
    "src/ServiceManagement",
    "src/Storage"
)

$PathStringsToIgnore = @(
    "Test"
)

$FilesChangedList = $FilesChanged -split ';'
$ChangeLogs = $FilesChangedList | where { $_ -like "*ChangeLog.md*" }
$UpdatedServicePaths = New-Object System.Collections.Generic.HashSet[string]
foreach ($ChangeLog in $ChangeLogs)
{
    if ($ChangeLog -like "src/ServiceManagement*")
    {
        $UpdatedServicePaths.Add("src/ServiceManagement") | Out-Null
    }
    elseif ($ChangeLog -like "src/Storage*")
    {
        $UpdatedServicePaths.Add("src/Storage") | Out-Null
    }
    else
    {
        # Handle ResourceManager to construct a string like "src/ResourceManager/{{service}}"
        $SplitPath = $ChangeLog -split '/'
        $BasePath = $SplitPath[0],$SplitPath[1],$SplitPath[2] -join "/"
        $UpdatedServicePaths.Add($BasePath) | Out-Null
    }
}

foreach ($File in $FilesChangedList)
{
    if ($File -like "*ChangeLog.md*" -or $File -like "*.psd1*")
    {
        continue
    }<commit_msg>Fix changelog checkeing script to be able to handle a change where more than 300 files change<commit_after>[CmdletBinding()]
Param
(
    [Parameter()]
    [string]$FilesChanged
)

$PathsToCheck = @(
    "src/Common",
    "src/ResourceManager",
    "src/ServiceManagement",
    "src/Storage"
)

$PathStringsToIgnore = @(
    "Test"
)

$FilesChangedList = $FilesChanged -split ';'

if ([string]::IsNullOrEmpty($FilesChanged) -or ($FilesChangedList.Count -eq 300))
{
    Write-Host "The list of files changed is empty or is past the 300 file limit; skipping check for change log entry"
    return
}

$ChangeLogs = $FilesChangedList | where { $_ -like "*ChangeLog.md*" }
$UpdatedServicePaths = New-Object System.Collections.Generic.HashSet[string]
foreach ($ChangeLog in $ChangeLogs)
{
    if ($ChangeLog -like "src/ServiceManagement*")
    {
        $UpdatedServicePaths.Add("src/ServiceManagement") | Out-Null
    }
    elseif ($ChangeLog -like "src/Storage*")
    {
        $UpdatedServicePaths.Add("src/Storage") | Out-Null
    }
    else
    {
        # Handle ResourceManager to construct a string like "src/ResourceManager/{{service}}"
        $SplitPath = $ChangeLog -split '/'
        $BasePath = $SplitPath[0],$SplitPath[1],$SplitPath[2] -join "/"
        $UpdatedServicePaths.Add($BasePath) | Out-Null
    }
}

foreach ($File in $FilesChangedList)
{
    if ($File -like "*ChangeLog.md*" -or $File -like "*.psd1*")
    {
        continue
    }
{'fraction_non_alphanumeric': 0.1447799199708985, 'fraction_numerical': 0.0061840669334303384, 'mean_word_length': 3.3375394321766563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2194314', 'n_tokens_mistral': 884, 'n_tokens_neox': 875, 'n_words': 197}