-
Notifications
You must be signed in to change notification settings - Fork 14
Fix automatic changelog generation for PR titles with markdown backticks and make workflow comment-triggered #317
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
Conversation
Co-authored-by: saulshanabrook <1186124+saulshanabrook@users.noreply.github.com>
CodSpeed WallTime Performance ReportMerging #317 will not alter performanceComparing Summary
|
CodSpeed Instrumentation Performance ReportMerging #317 will not alter performanceComparing Summary
Footnotes |
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.
Can you remove the tests for this?
@copilot Can you update this to remove the tests you added and also to change the action to only run when we have the string |
…tions-user changelog' Co-authored-by: saulshanabrook <1186124+saulshanabrook@users.noreply.github.com>
Done - removed the tests for markdown backticks. Commit c771348
Done - removed the tests and updated the workflow to only trigger on comments containing "@actions-user changelog". The workflow now uses issue_comment events instead of pull_request events. Commit c771348 |
@actions-user changelog |
Problem
The GitHub workflow for automatically generating changelog entries had two issues:
Markdown backticks were being stripped: When a PR title like "Support methods like
__array_function__
on expressions" was processed, the backticks and content between them would disappear from the changelog entry due to shell command substitution.Workflow ran automatically on all PRs: The changelog workflow would run on every PR open/edit event, which may not always be desired.
Root Cause
The shell command substitution issue occurred because the GitHub workflow was passing PR titles to the shell using double quotes:
When the shell processed a title containing backticks like
Support methods like \
array_function` on expressions, it interpreted the backticks as command substitution, attempting to execute
array_function` as a shell command.Solution
Fixed markdown backtick handling: Changed the workflow to use single quotes instead of double quotes around the PR title to prevent shell interpretation of special characters.
Made workflow comment-triggered: Updated the workflow to only run when someone comments
@actions-user changelog
on a PR, giving users control over when changelog entries are generated.The workflow now:
issue_comment
events instead ofpull_request
events@actions-user changelog
Testing
The core fix (single quotes) preserves markdown backticks correctly. The workflow changes allow manual control over changelog generation while maintaining all existing functionality.
Fixes #316.
💡 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.