-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix GitHub Actions step summary generation issues #3061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: DRSDavidSoft <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
…es, and merge artifact sections Co-authored-by: DRSDavidSoft <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
…ding Co-authored-by: DRSDavidSoft <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: DRSDavidSoft <[email protected]>
…formation Co-authored-by: DRSDavidSoft <[email protected]>
…pe emojis Co-authored-by: DRSDavidSoft <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes GitHub Actions step summary generation issues across three workflow files by replacing multiple echo commands with PowerShell here-strings, improving formatting consistency, and enhancing the information displayed in workflow summaries.
Key changes:
- Replaced individual
echocommands with here-string syntax (@"..."@) piped toAdd-Contentfor cleaner, more maintainable code - Added dynamic content including Cmder version, vendor package information, and artifact details with hashes
- Enhanced visual presentation with emojis, clickable links, and better-structured tables
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
.github/workflows/tests.yml |
Converted echo commands to here-strings, added Cmder version and PowerShell version to test environment info, enhanced vendor initialization summary with version details, and added a duration column to test results table |
.github/workflows/codeql.yml |
Converted echo commands to here-strings for cleaner summary generation in CodeQL security analysis workflow |
.github/workflows/build.yml |
Converted echo commands to here-strings, added build timestamp, clickable repository/branch/commit links, vendor packages table from sources.json, and comprehensive artifacts table with file type emojis, sizes, download links, and full SHA256 hashes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $emoji = "📦" | ||
| } | ||
| $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [📥 Download]($downloadUrl) | ``$hash`` |" |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The download URL points to the workflow run page, not directly to the artifact. Users will need to navigate to the artifacts section on that page to download. Consider changing the link text from "📥 Download" to "📥 View Run" or "📥 Go to Artifacts" to better reflect where the link goes and avoid confusion.
| $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [📥 Download]($downloadUrl) | ``$hash`` |" | |
| $summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [📥 View Run]($downloadUrl) | ``$hash`` |" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Actually it should link to the uploaded file, not view run, otherwise it is kind of useless. Please advise
| echo "| Runner OS | \`${{ runner.os }}\` |" >> $env:GITHUB_STEP_SUMMARY | ||
| echo "" >> $env:GITHUB_STEP_SUMMARY | ||
| # Get Cmder version | ||
| . scripts/utils.ps1 |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script sources utils.ps1 without error handling. If the script file doesn't exist or has syntax errors, this will cause the step to fail. Consider adding error handling to verify the script exists and can be loaded successfully.
| . scripts/utils.ps1 | |
| if (-not (Test-Path "scripts/utils.ps1")) { | |
| Write-Error "scripts/utils.ps1 not found. Failing step." | |
| exit 1 | |
| } | |
| try { | |
| . scripts/utils.ps1 | |
| } catch { | |
| Write-Error "Failed to source scripts/utils.ps1: $_" | |
| exit 1 | |
| } |
| echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY | ||
| echo "" >> $env:GITHUB_STEP_SUMMARY | ||
| # Get Cmder version | ||
| . scripts/utils.ps1 |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script sources utils.ps1 without error handling. If the script file doesn't exist or has syntax errors, this will cause the step to fail. Consider adding error handling to verify the script exists and can be loaded successfully.
| . scripts/utils.ps1 | |
| if (-not (Test-Path "scripts/utils.ps1")) { | |
| Write-Error "scripts/utils.ps1 not found. Exiting." | |
| exit 1 | |
| } | |
| try { | |
| . scripts/utils.ps1 | |
| } catch { | |
| Write-Error "Failed to source scripts/utils.ps1: $_" | |
| exit 1 | |
| } |
.github/workflows/tests.yml
Outdated
| echo "" >> $env:GITHUB_STEP_SUMMARY | ||
| # Get vendor versions | ||
| $vendorInfo = @() | ||
| $vendorDirs = @("conemu-maximus5", "clink", "git-for-windows") |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vendor directories are hardcoded here but might not match all vendors defined in sources.json. For consistency with the build workflow and to avoid maintenance issues, consider reading vendor names from sources.json instead of hardcoding them.
| $vendorDirs = @("conemu-maximus5", "clink", "git-for-windows") | |
| # Read vendor names from sources.json | |
| $sourcesPath = Join-Path $PSScriptRoot "..\sources.json" | |
| if (Test-Path $sourcesPath) { | |
| $sourcesJson = Get-Content $sourcesPath -Raw | ConvertFrom-Json | |
| $vendorDirs = $sourcesJson.PSObject.Properties.Name | |
| } else { | |
| Write-Warning "sources.json not found, using default vendor list." | |
| $vendorDirs = @("conemu-maximus5", "clink", "git-for-windows") | |
| } |
| ### Release Information | ||
| 🚀 Draft release created for tag: **``${{ github.ref_name }}``** |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heading "Release Information" is missing an emoji prefix, while the content below uses the 🚀 emoji. For consistency with other section headings, consider moving the emoji to the heading itself (e.g., "### 🚀 Release Information") rather than having it in the body text.
| ### Release Information | |
| 🚀 Draft release created for tag: **``${{ github.ref_name }}``** | |
| ### 🚀 Release Information | |
| Draft release created for tag: **``${{ github.ref_name }}``** |
| $summary = @" | ||
| ## 📦 Build Cmder - Workflow Summary | ||
| <small>Build started: $buildTime</small> |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the <small> HTML tag in GitHub markdown may not render consistently across all viewers (like mobile apps or email notifications). Consider using markdown italic formatting with asterisks instead: *Build started: $buildTime* for better compatibility.
| <small>Build started: $buildTime</small> | |
| *Build started: $buildTime* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Also wrap $buildTime in code tag (`)
|
@copilot The line between "✅ Cmder built successfully." and "🗃️ Artifacts" needs to be removed. |
…ree URL Co-authored-by: DRSDavidSoft <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
---3061/merge) to point to PR page instead of invalid tree URL💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.