-
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e171a76
feat: Add GITHUB_STEP_SUMMARY output to PR comments
devin-ai-integration[bot] 9b5ac0c
feat: Add GITHUB_STEP_SUMMARY output to failure comments
devin-ai-integration[bot] c68ba8e
test: Add CI workflow to verify GITHUB_STEP_SUMMARY feature
devin-ai-integration[bot] cb84eed
fix: Use shell task type for multiline poe commands
devin-ai-integration[bot] c6df182
fix: Use POE_SUMMARY_FILE for task output to fix summary display
devin-ai-integration[bot] d51646a
docs: Add GITHUB_STEP_SUMMARY usage to README
devin-ai-integration[bot] a28a3bc
refactor: Simplify to use GITHUB_STEP_SUMMARY directly, remove POE_SU…
devin-ai-integration[bot] 76ea61f
combine into one step
aaronsteers 98d6b85
Apply suggestion from @aaronsteers
aaronsteers f154f42
add test-fail-with-summary
aaronsteers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI Tests | ||
|
||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened, ready_for_review] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
|
||
jobs: | ||
test-with-summary: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run `poe test-with-summary` [Poe Command Processor] | ||
uses: ./ | ||
with: | ||
pr: ${{ github.event.pull_request.number }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
command: test-with-summary | ||
|
||
test-without-summary: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run `poe test-without-summary` [Poe Command Processor] | ||
uses: ./ | ||
with: | ||
pr: ${{ github.event.pull_request.number }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
command: test-without-summary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
[tasks] | ||
test = "echo 'Dummy tests...'" | ||
test-fail = "exit 1" | ||
|
||
[tasks.test-with-summary] | ||
shell = """ | ||
if [ -n "$GITHUB_STEP_SUMMARY" ]; then | ||
echo '## Test Results' >> "$GITHUB_STEP_SUMMARY" | ||
echo '' >> "$GITHUB_STEP_SUMMARY" | ||
echo 'This is a test of the GITHUB_STEP_SUMMARY feature.' >> "$GITHUB_STEP_SUMMARY" | ||
echo '' >> "$GITHUB_STEP_SUMMARY" | ||
echo '- ✅ Item 1: Success' >> "$GITHUB_STEP_SUMMARY" | ||
echo '- ✅ Item 2: Success' >> "$GITHUB_STEP_SUMMARY" | ||
echo '- ✅ Item 3: Success' >> "$GITHUB_STEP_SUMMARY" | ||
echo '' >> "$GITHUB_STEP_SUMMARY" | ||
echo '**Status**: All tests passed! 🎉' >> "$GITHUB_STEP_SUMMARY" | ||
fi | ||
echo 'Test with summary completed' | ||
""" | ||
|
||
[tasks.test-without-summary] | ||
shell = "echo 'Test without summary completed'" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.