Skip to content

Commit b251a40

Browse files
committed
Fix the comment summary
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 323b292 commit b251a40

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/update-tools.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,41 @@ jobs:
343343
comment-author: 'github-actions[bot]'
344344
body-includes: '## 🔧 MCP Server Tool List Updates'
345345

346+
- name: Download all commit info artifacts
347+
uses: actions/download-artifact@v4
348+
with:
349+
path: /tmp/comment-artifacts/
350+
pattern: commit-info-*
351+
merge-multiple: true
352+
353+
- name: Generate summary from artifacts
354+
id: generate-summary
355+
run: |
356+
SUMMARY=""
357+
358+
if [ -d "/tmp/comment-artifacts" ] && [ "$(ls -A /tmp/comment-artifacts 2>/dev/null)" ]; then
359+
for file in /tmp/comment-artifacts/*.type; do
360+
if [ -f "$file" ]; then
361+
SERVER_NAME=$(basename "$file" .type)
362+
TYPE=$(cat "$file")
363+
364+
if [ "$TYPE" = "update" ]; then
365+
SUMMARY="$SUMMARY| $SERVER_NAME | ✅ Updated | Tool list refreshed |\n"
366+
else
367+
SUMMARY="$SUMMARY| $SERVER_NAME | ⚠️ Warning | Could not fetch tools, added warning comment |\n"
368+
fi
369+
fi
370+
done
371+
fi
372+
373+
if [ -z "$SUMMARY" ]; then
374+
SUMMARY="| _No changes detected_ | | |"
375+
fi
376+
377+
echo "summary<<EOF" >> $GITHUB_OUTPUT
378+
echo -e "$SUMMARY" >> $GITHUB_OUTPUT
379+
echo "EOF" >> $GITHUB_OUTPUT
380+
346381
- name: Create or update comment
347382
if: github.event_name == 'pull_request'
348383
uses: peter-evans/create-or-update-comment@v4
@@ -358,7 +393,7 @@ jobs:
358393
359394
| Server | Status | Details |
360395
|--------|--------|---------|
361-
${{ needs.update-tools.outputs.summary || '| _Processing results..._ | | |' }}
396+
${{ steps.generate-summary.outputs.summary }}
362397
363398
---
364399
_This comment is automatically generated and will be updated as the workflow progresses._

0 commit comments

Comments
 (0)