diff --git a/issues/README.md b/issues/README.md new file mode 100644 index 0000000..a53a883 --- /dev/null +++ b/issues/README.md @@ -0,0 +1,109 @@ +# .NET API Documentation Issue Generator + +This project automates the creation of GitHub issues for documenting undocumented .NET APIs. It processes Excel compliance data and generates markdown templates for both individual namespace issues and a main tracking issue. + +## Prerequisites + +1. **PowerShell 7+** - Modern PowerShell version +2. **ImportExcel Module** - For reading Excel files: `Install-Module ImportExcel` +3. **GitHub CLI** - For creating issues: Install from [cli.github.com](https://cli.github.com) +4. **Excel Data File** - Compliance spreadsheet with API data + +## Quick Start + +### Step 1: Generate Markdown Issues + +```powershell +pwsh generate_markdown_issues.ps1 -ExcelFile UndocAPIReport_github.com_dotnet_dotnet-api-docs_main_dotnet-api-docs.xlsx -DotNetVersion 10.0 +``` + +This creates: +- `artifacts/namespace_issues/*.md` - Individual namespace issues +- `artifacts/main_issue.md` - Main tracking issue template +- `artifacts/issue_data.json` - Summary data + +### Step 2: Create GitHub Issues + +```powershell +pwsh create_github_issues.ps1 -Repo "owner/repo" +``` + +This creates: +- 1 main tracking issue from the generated template +- Individual namespace issues (count varies by .NET version) + +## Generated Outputs + +## File Structure + +``` +undocAPI/ +├── generate_markdown_issues.ps1 # Generate markdown from Excel data +├── create_github_issues.ps1 # Create GitHub issues from markdown +├── templates/ # Issue templates (editable) +│ ├── main_issue_template.md # Main tracking issue template +│ └── namespace_issue_template.md # Namespace issue template +├── artifacts/ # Generated files (safe to delete) +│ ├── namespace_issues/ # Individual namespace markdown files +│ ├── main_issue.md # Main tracking issue template +│ └── issue_data.json # Summary data +└── UndocAPIReport_*.xlsx # Source Excel compliance data +``` + +## Template System + +The system uses editable template files in the `templates/` directory: + +### Template Variables +Templates use `{{VARIABLE_NAME}}` syntax for replacements: +- `{{DOTNET_VERSION}}` - .NET version (e.g., "10.0") +- `{{TOTAL_APIS}}` - Total API count +- `{{TOTAL_NAMESPACES}}` - Total namespace count +- `{{NAMESPACE}}` - Namespace name +- `{{API_COUNT}}` - APIs in namespace +- `{{API_LIST}}` - Generated API list +- `{{NAMESPACE_CHECKLIST}}` - Generated namespace checklist + +### Template Comments +Comments in templates (between ``) are automatically removed during processing and can contain documentation about variables and formatting. + +## Configuration + +### .NET Version +Use the `-DotNetVersion` parameter: +```powershell +pwsh generate_markdown_issues.ps1 -DotNetVersion "11.0" +``` + +### Repository +Use the `-Repo` parameter: +```powershell +pwsh create_github_issues.ps1 -Repo "ericstj/scratch" +``` + +## Linking Workflow + +The system creates bidirectional links between issues: + +1. **Main Tracking Issue**: Created first with placeholders for namespace issue numbers +2. **Namespace Issues**: Created with links back to the main tracking issue +3. **Link Updates**: Main tracking issue is automatically updated with actual namespace issue numbers + +### Issue Cross-References +- Each namespace issue links to the main tracking issue: "Please follow the instructions in the main tracking issue (#123)" +- The main tracking issue links to each namespace issue: "- [ ] **Namespace** (X APIs) - #456" + +## Data Sources + +The system reads from the Excel compliance spreadsheet and filters for: +- APIs matching the specified .NET version +- Non-null API links with proper formatting +- Grouped by namespace for organization + +## Clean Workflow + +1. **Generate** → `pwsh generate_markdown_issues.ps1 -DotNetVersion "X.X"` +2. **Review** → Check `artifacts/` directory contents +3. **Deploy** → `pwsh create_github_issues.ps1 -Repo "owner/repo"` + +The `artifacts/` directory can be safely deleted and regenerated at any time. \ No newline at end of file diff --git a/issues/create_github_issues.ps1 b/issues/create_github_issues.ps1 new file mode 100644 index 0000000..4caf8af --- /dev/null +++ b/issues/create_github_issues.ps1 @@ -0,0 +1,204 @@ +# Create GitHub issues from generated markdown files +# +# This script reads markdown files from artifacts/namespace_issues/ and creates: +# - 1 main tracking issue from artifacts/main_issue.md +# - Individual namespace issues from artifacts/namespace_issues/ +# +# Prerequisites: +# - GitHub CLI (gh) installed and authenticated +# - Generated markdown files from generate_markdown_issues.ps1 +# +# Usage: +# pwsh create_github_issues.ps1 -Repo "owner/repo" + +param( + [Parameter(Mandatory=$true)] + [string]$Repo +) + +# Parse repository owner and name from format "owner/repo" +if ($Repo -notmatch '^([^/]+)/([^/]+)$') { + Write-Error "❌ Invalid repository format. Use: owner/repo (e.g., 'ericstj/scratch')" + exit 1 +} + +$RepoOwner = $Matches[1] +$RepoName = $Matches[2] + +Write-Host "🎯 Target repository: $RepoOwner/$RepoName" -ForegroundColor Cyan + +# Read summary data to get .NET version and counts +$SummaryFile = "artifacts\issue_data.json" +if (-not (Test-Path $SummaryFile)) { + Write-Error "❌ Summary file not found: $SummaryFile" + Write-Host "Please run generate_markdown_issues.ps1 first to create the artifacts." -ForegroundColor Yellow + exit 1 +} + +$SummaryData = Get-Content $SummaryFile | ConvertFrom-Json +$DotNetVersion = $SummaryData.dotnet_version +$TotalAPIs = $SummaryData.total_apis +$TotalNamespaces = $SummaryData.total_namespaces + +Write-Host "🔄 Creating .NET $DotNetVersion documentation issues..." -ForegroundColor Green +Write-Host "📊 Will create $TotalNamespaces namespace issues for $TotalAPIs APIs" -ForegroundColor White + +# Create main tracking issue +Write-Host "📝 Creating main tracking issue..." +$MainIssueFile = "artifacts\main_issue.md" + +if (-not (Test-Path $MainIssueFile)) { + Write-Error "❌ Main issue template not found: $MainIssueFile" + Write-Host "Please run generate_markdown_issues.ps1 first to create the template." -ForegroundColor Yellow + exit 1 +} + +# Create the main tracking issue +Write-Host "📝 Creating main tracking issue..." +$MainIssueTitle = ".NET $DotNetVersion API Documentation Tracking Issue" +$MainIssueUrl = gh issue create --repo "$RepoOwner/$RepoName" --title $MainIssueTitle --body-file $MainIssueFile + +if ($LASTEXITCODE -eq 0 -and -not [string]::IsNullOrEmpty($MainIssueUrl)) { + Write-Host "✅ Created main tracking issue: $MainIssueUrl" -ForegroundColor Green + + # Extract the main issue number from the URL + $MainIssueNumber = ($MainIssueUrl -split '/')[-1] + Write-Host "📋 Main tracking issue number: #$MainIssueNumber" -ForegroundColor White +} else { + Write-Host "❌ Failed to create main tracking issue" -ForegroundColor Red + Write-Host "Please check your GitHub CLI authentication and repository permissions." -ForegroundColor Yellow + exit 1 +} + +# Create individual namespace issues +Write-Host "📚 Creating namespace issues..." +$NamespaceFiles = Get-ChildItem "artifacts\namespace_issues\*.md" | Where-Object { $_.Name -notlike "*_part*.md" } | Sort-Object Name +$CreatedCount = 0 +$NamespaceIssueMap = @{} + +foreach ($File in $NamespaceFiles) { + $Namespace = $File.BaseName.Replace('_', '.') + $Title = "$Namespace docs for .NET $DotNetVersion APIs" + + Write-Host " Creating: $Title" + + try { + # Read the template and replace the main tracking issue placeholder + $TemplateContent = Get-Content $File.FullName -Raw + $UpdatedContent = $TemplateContent -replace '#MAIN_TRACKING_ISSUE_NUMBER', "#$MainIssueNumber" + + # Create a temporary file with updated content + $TempFile = [System.IO.Path]::GetTempFileName() + $UpdatedContent | Out-File -FilePath $TempFile -Encoding UTF8 + + $IssueUrl = gh issue create --repo "$RepoOwner/$RepoName" --title $Title --body-file $TempFile + + # Clean up temp file + Remove-Item $TempFile -Force + + if ($LASTEXITCODE -eq 0 -and -not [string]::IsNullOrEmpty($IssueUrl)) { + Write-Host " ✅ Created: $IssueUrl" -ForegroundColor Green + $CreatedCount++ + + # Extract issue number and store mapping + $IssueNumber = ($IssueUrl -split '/')[-1] + $NamespaceIssueMap[$Namespace] = $IssueNumber + + # Check for split parts and add them as comments + $SafeName = $File.BaseName + $PartFiles = Get-ChildItem "artifacts\namespace_issues\$($SafeName)_part*.md" -ErrorAction SilentlyContinue + + if ($PartFiles.Count -gt 0) { + Write-Host " 📝 Adding $($PartFiles.Count) comment parts..." -ForegroundColor Cyan + + foreach ($PartFile in ($PartFiles | Sort-Object Name)) { + $PartContent = Get-Content $PartFile.FullName -Raw + + try { + # Create a temporary file for the comment body to avoid command line length limits + $TempCommentFile = [System.IO.Path]::GetTempFileName() + $PartContent | Out-File -FilePath $TempCommentFile -Encoding UTF8 + + gh issue comment $IssueNumber --repo "$RepoOwner/$RepoName" --body-file $TempCommentFile | Out-Null + + # Clean up temp file + Remove-Item $TempCommentFile -Force + + if ($LASTEXITCODE -eq 0) { + Write-Host " ✅ Added comment from $($PartFile.Name)" -ForegroundColor Green + } else { + Write-Host " ❌ Failed to add comment from $($PartFile.Name)" -ForegroundColor Red + } + } + catch { + Write-Host " ❌ Error adding comment from $($PartFile.Name): $_" -ForegroundColor Red + } + + # Small delay between comments + Start-Sleep -Milliseconds 100 + } + } + } else { + Write-Host " ❌ Failed to create issue for $Namespace" -ForegroundColor Red + } + + # Small delay to avoid rate limiting + Start-Sleep -Milliseconds 250 + } + catch { + Write-Host " ❌ Failed to create issue for $Namespace : $_" -ForegroundColor Red + } +} + +# Update the main tracking issue with actual namespace issue links +if ($NamespaceIssueMap.Count -gt 0) { + Write-Host "🔗 Updating main tracking issue with namespace issue links..." + + try { + # Read the main issue template + $MainIssueContent = Get-Content $MainIssueFile -Raw + + # Replace each namespace placeholder with actual issue number + # Sort by namespace length (longest first) to avoid substring matching issues + $SortedEntries = $NamespaceIssueMap.GetEnumerator() | Sort-Object { $_.Key.Length } -Descending + + foreach ($NamespaceEntry in $SortedEntries) { + $Namespace = $NamespaceEntry.Key + $IssueNumber = $NamespaceEntry.Value + $SafeName = $Namespace -replace '\.', '_' -replace ' ', '_' + + # Find and replace the exact placeholder with GitHub issue reference + $Pattern = "NAMESPACE_ISSUE_PLACEHOLDER_$([regex]::Escape($SafeName))\b" + $Replacement = "#$IssueNumber" + $MainIssueContent = $MainIssueContent -replace $Pattern, $Replacement + } + + # Create temp file with updated content + $TempMainFile = [System.IO.Path]::GetTempFileName() + $MainIssueContent | Out-File -FilePath $TempMainFile -Encoding UTF8 + + # Update the main issue + gh issue edit $MainIssueNumber --repo "$RepoOwner/$RepoName" --body-file $TempMainFile | Out-Null + + # Clean up temp file + Remove-Item $TempMainFile -Force + + if ($LASTEXITCODE -eq 0) { + Write-Host "✅ Updated main tracking issue with namespace links" -ForegroundColor Green + } else { + Write-Host "⚠️ Failed to update main tracking issue with links" -ForegroundColor Yellow + } + } + catch { + Write-Host "⚠️ Failed to update main tracking issue: $_" -ForegroundColor Yellow + } +} + +Write-Host "`n🎉 GitHub Issue Creation Complete!" -ForegroundColor Green +Write-Host "📊 Summary:" -ForegroundColor Yellow +Write-Host " - .NET version: $DotNetVersion" -ForegroundColor White +Write-Host " - Main tracking issue created" -ForegroundColor White +Write-Host " - Namespace issues created: $CreatedCount" -ForegroundColor White +Write-Host " - Total APIs to be documented: $TotalAPIs" -ForegroundColor White +Write-Host " - Repository: https://github.com/$RepoOwner/$RepoName/issues" -ForegroundColor White +Write-Host "`n✅ All issues created with properly formatted API links!" -ForegroundColor Green \ No newline at end of file diff --git a/issues/generate_markdown_issues.ps1 b/issues/generate_markdown_issues.ps1 new file mode 100644 index 0000000..17a7592 --- /dev/null +++ b/issues/generate_markdown_issues.ps1 @@ -0,0 +1,324 @@ +# PowerShell script to generate GitHub issue markdown files for undocumented .NET APIs +# Processes Excel data and creates individual namespace issues plus a main tracking issue +# +# Features: +# - Reads undocumented API data from Excel +# - Groups APIs by namespace and class +# - Creates separate issue files for each namespace +# - Generates a main tracking issue with links to all namespace issues +# - Uses editable markdown templates for customization +# - Handles large namespaces by splitting content (main issue + comment parts) +# - Formats API documentation links correctly for GitHub +# +# Usage: pwsh generate_markdown_issues.ps1 [-DotNetVersion "10.0"] + +param( + [string]$ExcelFile = "UndocAPIReport_github.com_dotnet_dotnet-api-docs_main_dotnet-api-docs.xlsx", + [string]$DotNetVersion = "10.0" +) + +# Check if ImportExcel module is available +if (-not (Get-Module -ListAvailable -Name ImportExcel)) { + Write-Host "❌ ImportExcel module not found. Installing..." -ForegroundColor Red + try { + Install-Module ImportExcel -Force -Scope CurrentUser + Write-Host "✅ ImportExcel module installed successfully" -ForegroundColor Green + } + catch { + Write-Host "❌ Failed to install ImportExcel module: $_" -ForegroundColor Red + Write-Host "Please install manually: Install-Module ImportExcel -Force" -ForegroundColor Yellow + exit 1 + } +} + +# Check if Excel file exists +if (-not (Test-Path $ExcelFile)) { + Write-Host "❌ Excel file not found: $ExcelFile" -ForegroundColor Red + exit 1 +} + +Write-Host "🔄 Loading Excel data from $ExcelFile..." -ForegroundColor Green +Write-Host "🎯 Target .NET version: $DotNetVersion" -ForegroundColor White + +# Import the Excel data +try { + $ExcelData = Import-Excel -Path $ExcelFile -WorksheetName "Compliance" + Write-Host "✅ Loaded $($ExcelData.Count) total records from Compliance sheet" -ForegroundColor Green +} +catch { + Write-Host "❌ Failed to load Excel data: $_" -ForegroundColor Red + exit 1 +} + +# Filter for the specific .NET version (using Version Introduced column) +$NetVersionAPIs = $ExcelData | Where-Object { $_.'Version Introduced' -eq $DotNetVersion } +Write-Host "✅ Found $($NetVersionAPIs.Count) .NET $DotNetVersion APIs" -ForegroundColor Green + +if ($NetVersionAPIs.Count -eq 0) { + Write-Host "❌ No APIs found for .NET version $DotNetVersion" -ForegroundColor Red + exit 1 +} + +# Group APIs by namespace for individual issues +$apisByNamespace = $NetVersionAPIs | Group-Object -Property "Namespace" | Sort-Object Name + +# Create output directory +$OutputDir = "artifacts\namespace_issues" +if (Test-Path $OutputDir) { + Remove-Item $OutputDir -Recurse -Force +} +New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null +Write-Host "📁 Created output directory: $OutputDir" -ForegroundColor Green + +# Load templates +$NamespaceTemplate = Get-Content "templates\namespace_issue_template.md" -Raw +if (-not $NamespaceTemplate) { + Write-Host "❌ Failed to load namespace issue template" -ForegroundColor Red + exit 1 +} + +# Function to create namespace issue content +function New-NamespaceIssue { + param( + [string]$Namespace, + [array]$APIs, + [string]$DotNetVersion + ) + + # Group APIs by class + $apisByClass = $APIs | Group-Object -Property "Class" | Sort-Object Name + + # Create API list grouped by class + $apiListContent = "" + foreach ($classGroup in $apisByClass) { + $className = $classGroup.Name + if ([string]::IsNullOrWhiteSpace($className)) { + $className = "Unknown" + } + + $apiListContent += "### $className`n`n" + + foreach ($api in ($classGroup.Group | Sort-Object "Name")) { + $apiName = $api."Name" + $docPath = $api."Source File Path" + + if (-not [string]::IsNullOrWhiteSpace($docPath)) { + # Use the API column which already has the formatted link + $apiListContent += "- " + $api."API" + "`n" + } else { + $apiListContent += "- $apiName`n" + } + } + $apiListContent += "`n" + } + + # Replace placeholders in template + $content = $NamespaceTemplate + $content = $content -replace '\{\{NAMESPACE\}\}', $Namespace + $content = $content -replace '\{\{DOTNET_VERSION\}\}', $DotNetVersion + $content = $content -replace '\{\{API_COUNT\}\}', $APIs.Count + $content = $content -replace '\{\{API_LIST\}\}', $apiListContent.TrimEnd() + $content = $content -replace '\{\{MAIN_ISSUE_NUMBER\}\}', '#MAIN_TRACKING_ISSUE_NUMBER' + + return @{ + Content = $content + APIsByClass = $apisByClass + ApiCount = $APIs.Count + } +} + +# Function to create split namespace issue (header only) +function New-SplitNamespaceIssue { + param( + [string]$Namespace, + [int]$ApiCount, + [string]$DotNetVersion + ) + + # Create header-only content for split issues + $content = $NamespaceTemplate + $content = $content -replace '\{\{NAMESPACE\}\}', $Namespace + $content = $content -replace '\{\{API_COUNT\}\}', $ApiCount + $content = $content -replace '\{\{API_LIST\}\}', "This namespace has been split into multiple comments below due to GitHub's size limits. Please see the individual class comments for the complete API list." + $content = $content -replace '\{\{MAIN_ISSUE_NUMBER\}\}', '#MAIN_TRACKING_ISSUE_NUMBER' + + return $content +} + +# Function to create class comment content +function New-ClassComment { + param( + [string]$ClassName, + [array]$APIs + ) + + $content = "### $ClassName`n`n" + + foreach ($api in ($APIs | Sort-Object "Name")) { + $apiName = $api."Name" + $docPath = $api."Source File Path" + + if (-not [string]::IsNullOrWhiteSpace($docPath)) { + # Use the API column which already has the formatted link + $content += "- " + $api."API" + "`n" + } else { + $content += "- $apiName`n" + } + } + + return $content +} + +# Function to create main tracking issue +function New-MainTrackingIssue { + param( + [string]$DotNetVersion, + [int]$TotalAPIs, + [int]$TotalNamespaces, + [array]$NamespaceGroups + ) + + # Load main issue template + $MainTemplate = Get-Content "templates\main_issue_template.md" -Raw + if (-not $MainTemplate) { + Write-Host "❌ Failed to load main issue template" -ForegroundColor Red + return "" + } + + # Create namespace table (no headers since template has them) + $namespaceTable = "" + + foreach ($namespaceGroup in $NamespaceGroups) { + $namespace = $namespaceGroup.Name + $apiCount = $namespaceGroup.Count + $safeName = $namespace -replace '\.', '_' -replace ' ', '_' + $namespaceTable += "| $namespace | $apiCount | NAMESPACE_ISSUE_PLACEHOLDER_$safeName |`n" + } + + # Replace placeholders in template + $content = $MainTemplate + $content = $content -replace '\{\{DOTNET_VERSION\}\}', $DotNetVersion + $content = $content -replace '\{\{TOTAL_APIS\}\}', $TotalAPIs + $content = $content -replace '\{\{TOTAL_NAMESPACES\}\}', $TotalNamespaces + $content = $content -replace '\{\{NAMESPACE_TABLE\}\}', $namespaceTable.TrimEnd() + + return $content +} + +# Generate individual namespace issues +Write-Host "🔨 Generating namespace issues..." -ForegroundColor Green +$createdCount = 0 + +foreach ($namespaceGroup in $apisByNamespace) { + $namespace = $namespaceGroup.Name + $apis = $namespaceGroup.Group + + Write-Host " Creating issue for $namespace ($($apis.Count) APIs)..." -ForegroundColor White + + # Generate the issue content + $issueData = New-NamespaceIssue -Namespace $namespace -APIs $apis -DotNetVersion $DotNetVersion + $issueContent = $issueData.Content + + # Create safe filename + $safeName = $namespace -replace '\.', '_' -replace ' ', '_' + $filename = "$OutputDir\$safeName.md" + + # Check if content is too large (GitHub limit is ~65KB, use small buffer) + if ($issueContent.Length -gt 20000) { + Write-Host " ⚠️ Content too large ($($issueContent.Length) chars), will use split strategy" -ForegroundColor Yellow + + # Create header-only content for the main issue + $splitContent = New-SplitNamespaceIssue -Namespace $namespace -ApiCount $issueData.ApiCount -DotNetVersion $DotNetVersion + $splitContent | Out-File -FilePath $filename -Encoding UTF8 + + # Create additional files for class groups (will be used as comments) + $classIndex = 1 + foreach ($classGroup in ($issueData.APIsByClass | Sort-Object Name)) { + $className = $classGroup.Name + if ([string]::IsNullOrWhiteSpace($className)) { + $className = "Unknown" + } + + $classApis = $classGroup.Group + $classContent = New-ClassComment -ClassName $className -APIs $classApis + + # Check if this single class content is too large for one comment (GitHub limit ~65KB) + if ($classContent.Length -gt 60000) { + Write-Host " ⚠️ Class $className too large ($($classContent.Length) chars), splitting into chunks" -ForegroundColor Yellow + + # Split APIs into chunks of ~50 APIs each for very large classes + $chunkSize = 50 + $chunks = [math]::Ceiling($classApis.Count / $chunkSize) + + for ($chunkIndex = 0; $chunkIndex -lt $chunks; $chunkIndex++) { + $startIndex = $chunkIndex * $chunkSize + $endIndex = [math]::Min(($chunkIndex + 1) * $chunkSize - 1, $classApis.Count - 1) + $chunkApis = $classApis[$startIndex..$endIndex] + + # Use "(continued)" naming for subsequent chunks + $chunkTitle = if ($chunkIndex -eq 0) { $className } else { "$className (continued)" } + $chunkContent = New-ClassComment -ClassName $chunkTitle -APIs $chunkApis + + $classFilename = "$OutputDir\$safeName" + "_part$($classIndex.ToString('00')).md" + $chunkContent | Out-File -FilePath $classFilename -Encoding UTF8 + Write-Host " 📝 Created part $($classIndex.ToString('00')) for $chunkTitle ($($chunkApis.Count) APIs)" -ForegroundColor Cyan + $classIndex++ + } + } else { + # Single class fits in one comment + $classFilename = "$OutputDir\$safeName" + "_part$($classIndex.ToString('00')).md" + $classContent | Out-File -FilePath $classFilename -Encoding UTF8 + Write-Host " 📝 Created part $($classIndex.ToString('00')) for $className ($($classApis.Count) APIs)" -ForegroundColor Cyan + $classIndex++ + } + } + } else { + # Normal single-file output + $issueContent | Out-File -FilePath $filename -Encoding UTF8 + } + + $createdCount++ + Write-Host " ✅ Created $filename" -ForegroundColor Green +} + +# Create main tracking issue template +Write-Host "📋 Creating main tracking issue template..." -ForegroundColor Green +$mainIssueContent = New-MainTrackingIssue -DotNetVersion $DotNetVersion -TotalAPIs $NetVersionAPIs.Count -TotalNamespaces $apisByNamespace.Count -NamespaceGroups $apisByNamespace +$mainIssueFile = "artifacts\main_issue.md" +$mainIssueContent | Out-File -FilePath $mainIssueFile -Encoding UTF8 +Write-Host "✅ Created main tracking issue template: $mainIssueFile" -ForegroundColor Green + +# Create summary JSON file +Write-Host "💾 Creating summary data file..." -ForegroundColor Green + +$summaryData = @{ + total_apis = $NetVersionAPIs.Count + total_namespaces = $apisByNamespace.Count + dotnet_version = $DotNetVersion + namespaces = @() +} + +foreach ($namespaceGroup in $apisByNamespace) { + $summaryData.namespaces += @{ + name = $namespaceGroup.Name + api_count = $namespaceGroup.Count + filename = ($namespaceGroup.Name -replace '\.', '_' -replace ' ', '_') + ".md" + } +} + +$summaryData | ConvertTo-Json -Depth 3 | Out-File -FilePath "artifacts\issue_data.json" -Encoding UTF8 + +Write-Host "" +Write-Host "🎉 Generation Complete!" -ForegroundColor Green +Write-Host "📊 Summary:" -ForegroundColor White +Write-Host " - .NET version: $DotNetVersion" -ForegroundColor White +Write-Host " - Generated namespace issues: $createdCount" -ForegroundColor White +Write-Host " - Total APIs to document: $($NetVersionAPIs.Count)" -ForegroundColor White +Write-Host " - Output directory: $OutputDir" -ForegroundColor White +Write-Host " - Summary data: artifacts\issue_data.json" -ForegroundColor White +Write-Host " - Main tracking issue: artifacts\main_issue.md" -ForegroundColor White +Write-Host "" +Write-Host "📋 Next steps:" -ForegroundColor Green +Write-Host "1. Review the generated issues in $OutputDir" -ForegroundColor White +Write-Host "2. Edit create_github_issues.ps1 to set your target repository" -ForegroundColor White +Write-Host "3. Run: pwsh create_github_issues.ps1" -ForegroundColor White \ No newline at end of file