Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 14, 2025

  • Analyze the current issues with GITHUB_STEP_SUMMARY generation
  • Fix the PowerShell echo command issues in build.yml (backticks and variable expansion)
  • Add Cmder version to build workflow summary
  • Fix the PowerShell echo command issues in tests.yml
  • Enhance tests.yml to provide more verbose and useful information
  • Fix the PowerShell echo command issues in codeql.yml
  • Test the generated summaries locally with PowerShell to ensure correctness
  • Add clickable links to repository, branch, commit, and actor in build summary
  • Add ISO timestamp for build start time
  • Add vendor packages table from sources.json
  • Show full SHA256 hashes (not truncated)
  • Merge artifacts and upload sections into single table with download links
  • Add section separators with ---
  • Reduce duplicate emoji usage
  • Fix incomplete summary by initializing $summary variable before appending to it
  • Combine backticks with links for code formatting on clickable values
  • Simplify build success message to "Cmder built successfully"
  • Reorder artifacts table columns (Download before Hash) for better readability
  • Fix branch links for PR merge refs (e.g., 3061/merge) to point to PR page instead of invalid tree URL
  • Verify all changes work correctly

💡 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.

Copilot AI self-assigned this Dec 14, 2025
Copilot AI changed the title [WIP] Fix generation of GitHub step summary Fix GitHub Actions step summary generation issues Dec 14, 2025
Copilot AI requested a review from DRSDavidSoft December 14, 2025 22:10
@DRSDavidSoft

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.

@cmderdev cmderdev deleted a comment from Copilot AI Dec 15, 2025
@DRSDavidSoft DRSDavidSoft marked this pull request as ready for review December 15, 2025 02:41
Copilot AI review requested due to automatic review settings December 15, 2025 02:41
@DRSDavidSoft

This comment was marked as resolved.

Copy link

Copilot AI left a 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 echo commands with here-string syntax (@"..."@) piped to Add-Content for 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`` |"
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
$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`` |"

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@DRSDavidSoft DRSDavidSoft Dec 15, 2025

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
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
. 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
}

Copilot uses AI. Check for mistakes.
echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
# Get Cmder version
. scripts/utils.ps1
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
. 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
}

Copilot uses AI. Check for mistakes.
echo "" >> $env:GITHUB_STEP_SUMMARY
# Get vendor versions
$vendorInfo = @()
$vendorDirs = @("conemu-maximus5", "clink", "git-for-windows")
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
$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")
}

Copilot uses AI. Check for mistakes.
Comment on lines +191 to +193
### Release Information
🚀 Draft release created for tag: **``${{ github.ref_name }}``**
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
### Release Information
🚀 Draft release created for tag: **``${{ github.ref_name }}``**
### 🚀 Release Information
Draft release created for tag: **``${{ github.ref_name }}``**

Copilot uses AI. Check for mistakes.
$summary = @"
## 📦 Build Cmder - Workflow Summary
<small>Build started: $buildTime</small>
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
<small>Build started: $buildTime</small>
*Build started: $buildTime*

Copilot uses AI. Check for mistakes.
Copy link
Contributor

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
Copy link
Contributor

@copilot The line between "✅ Cmder built successfully." and "🗃️ Artifacts" needs to be removed.
Also, in the 📁 Vendor Packages, please add a small link to the (sources.json) like how I wrote it.
The version column in the vendor packages must link to that specific release in GitHub as well.

This comment was marked as resolved.

@DRSDavidSoft DRSDavidSoft added the 🔄️ GitHub Actions Pull requests that update GitHub Actions code label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔄️ GitHub Actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants