-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add GITHUB_STEP_SUMMARY output to PR comments #17
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
- Add step to read GITHUB_STEP_SUMMARY after task execution - Include summary content in PR comments using expandable <details> block - Only render summary section when content exists - Uses format: <details><summary>✳️ Show/Hide Summary Output</summary> Requested by @aaronsteers Link to Devin run: https://app.devin.ai/sessions/7ec095caed01494693ef260c6a6db2ad Co-Authored-By: AJ Steers <[email protected]>
Original prompt from AJ Steers
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Include summary output in failure comments using expandable <details> block - Use ✴️ emoji for failure output (vs ✳️ for success) - Only render summary section when content exists Co-Authored-By: AJ Steers <[email protected]>
- Add test-with-summary task that writes sample markdown to GITHUB_STEP_SUMMARY - Add test-without-summary task as a control (no summary output) - Create ci-tests.yml workflow triggered on PR synchronize events - Only run tests when PR is not in draft status Co-Authored-By: AJ Steers <[email protected]>
|
|
The test-with-summary task was using invalid syntax for poethepoet. Multiline commands require the 'shell' task type with shell = """...""" syntax. This fixes the CI failure where poe reported: 'Invalid cmd task includes multiple command lines' Co-Authored-By: AJ Steers <[email protected]>
|
|
The previous implementation relied on GITHUB_STEP_SUMMARY being accessible within the composite action, but this file is managed by GitHub Actions and not reliably readable across action steps. Solution: - Create a temporary file (POE_SUMMARY_FILE) at the start of the action - Have tasks write to POE_SUMMARY_FILE instead of GITHUB_STEP_SUMMARY - Read from POE_SUMMARY_FILE in the read-summary step - Copy content to GITHUB_STEP_SUMMARY for job summary visibility - Maintain backward compatibility by falling back to GITHUB_STEP_SUMMARY This ensures dual visibility: task output appears in both the GitHub job summary and the PR comments. Co-Authored-By: AJ Steers <[email protected]>
✳️ Show/Hide Summary OutputTest ResultsThis is a test of the GITHUB_STEP_SUMMARY feature.
Status: All tests passed! 🎉 |
|
Co-Authored-By: AJ Steers <[email protected]>
|
✳️ Show/Hide Summary OutputTest ResultsThis is a test of the GITHUB_STEP_SUMMARY feature.
Status: All tests passed! 🎉 |
…MMARY_FILE Co-Authored-By: AJ Steers <[email protected]>
|
|
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 adds support for Poe tasks to publish markdown output that appears in both GitHub Actions job summaries and as expandable sections in PR comments via the GITHUB_STEP_SUMMARY
environment variable.
- Enhanced action.yml to read and include
GITHUB_STEP_SUMMARY
content in PR comments as expandable details sections - Added comprehensive documentation and usage examples for the new feature
- Implemented CI testing workflow to validate both with-summary and without-summary scenarios
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
action.yml | Added step to read GITHUB_STEP_SUMMARY and include content in success/failure PR comments with expandable sections |
README.md | Added "Publishing Task Output" documentation with usage examples and implementation guidance |
poe_tasks.toml | Added test tasks test-with-summary and test-without-summary for feature validation |
.github/workflows/ci-tests.yml | Added CI workflow to test both summary scenarios automatically on PRs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
✳️ Show/Hide Summary Output |
✳️ Show/Hide Summary OutputTest ResultsThis is a test of the GITHUB_STEP_SUMMARY feature.
Status: All tests passed! 🎉 |
|
✴️ Show/Hide Summary OutputTest ResultsThis is a test of the GITHUB_STEP_SUMMARY feature.
ERROR: Something bad happened ☠️ |
✳️ Show/Hide Summary OutputTest ResultsThis is a test of the GITHUB_STEP_SUMMARY feature.
Status: All tests passed! 🎉 |
|
feat: Add task output publishing to PR comments via GITHUB_STEP_SUMMARY
Summary
This PR enables Poe tasks to publish markdown output that appears in both the GitHub Actions job summary and as expandable sections in PR comments. Tasks can write to the standard
GITHUB_STEP_SUMMARY
environment variable, and the output will be automatically included in slash command responses.Key changes:
read-summary
step to detect and readGITHUB_STEP_SUMMARY
content, then include it in success/failure PR comments as expandable<details>
blocks (✳️ for success, ✴️ for failure).github/workflows/ci-tests.yml
to validate the feature with two test scenariostest-with-summary
andtest-without-summary
inpoe_tasks.toml
for testingThe implementation is opt-in: tasks that don't write to
GITHUB_STEP_SUMMARY
work as before, while tasks that do write to it get enhanced PR comment responses with their output.Review & Testing Checklist for Human
/poe test-with-summary
on this PR and verify the expandable ✳️ summary section appears with the test output/poe test-without-summary
and verify NO summary section appears (just the success message)test-with-summary
Notes
GITHUB_STEP_SUMMARY
directly, removing the temporary file mechanismGITHUB_STEP_SUMMARY
works correctly in composite actionsSession: https://app.devin.ai/sessions/7ec095caed01494693ef260c6a6db2ad
Requested by: @aaronsteers