-
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?
Changes from all commits
3810b8d
1e04711
0bc7fd3
2057ee5
bff3862
838c1cf
27c7a0c
a937901
825df3a
a52b0b9
641ce7b
2780a43
684185c
dc93fa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -42,17 +42,60 @@ jobs: | |||||||||||||
| - name: Summary - Repository checkout | ||||||||||||||
| shell: pwsh | ||||||||||||||
| run: | | ||||||||||||||
| echo "## π¦ Build Cmder - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "### Repository Information" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| echo "" >> $env:GITHUB_STEP_SUMMARY | ||||||||||||||
| # Get Cmder version | ||||||||||||||
| . scripts/utils.ps1 | ||||||||||||||
| $cmderVersion = Get-VersionStr | ||||||||||||||
| $buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") | ||||||||||||||
|
|
||||||||||||||
| # Determine branch link (handle PR merge refs) | ||||||||||||||
| $branchName = "${{ github.ref_name }}" | ||||||||||||||
| $branchLink = "" | ||||||||||||||
| if ($branchName -match '^(\d+)/(merge|head)$') { | ||||||||||||||
| # This is a PR merge/head ref, link to the PR | ||||||||||||||
| $prNumber = $Matches[1] | ||||||||||||||
| $branchLink = "https://github.com/${{ github.repository }}/pull/$prNumber" | ||||||||||||||
| } elseif ("${{ github.event_name }}" -eq "pull_request") { | ||||||||||||||
| # This is a pull request event, link to the PR | ||||||||||||||
| $branchLink = "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" | ||||||||||||||
| } else { | ||||||||||||||
| # Regular branch, link to the branch tree | ||||||||||||||
| $branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}" | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| $summary = @" | ||||||||||||||
| ## π¦ Build Cmder - Workflow Summary | ||||||||||||||
|
|
||||||||||||||
| <small>Build started: $buildTime</small> | ||||||||||||||
|
||||||||||||||
| <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 (`)
DRSDavidSoft marked this conversation as resolved.
Show resolved
Hide resolved
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 file hash calculation doesn't include error handling. If a file doesn't exist (the Test-Path check passed) but becomes unavailable before Get-FileHash is called, this will cause an error. Consider adding error handling around Get-FileHash or combining the Test-Path check with the hash calculation in a try-catch block.
| $hash = (Get-FileHash $path -Algorithm SHA256).Hash | |
| try { | |
| $hash = (Get-FileHash $path -Algorithm SHA256).Hash | |
| } catch { | |
| $hash = "N/A" | |
| } |
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 }}``** |
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.