|
28 | 28 |
|
29 | 29 | permissions: |
30 | 30 | contents: read |
| 31 | + pull-requests: write |
31 | 32 |
|
32 | 33 | concurrency: |
33 | 34 | group: ${{ github.workflow }}-${{ github.ref }} |
|
46 | 47 | ref: ${{ github.event.inputs.target_ref || github.ref }} |
47 | 48 |
|
48 | 49 | - name: Run MCP Server Diff |
| 50 | + id: mcp_diff |
49 | 51 | uses: SamMorrowDrums/mcp-server-diff@f7e5e58a4b0c4f68a5827adad2292953bb1ab9ef # v2.3.5 |
50 | 52 | with: |
51 | 53 | setup_node: 'true' |
|
71 | 73 | echo "- New resources, prompts, or capabilities" >> $GITHUB_STEP_SUMMARY |
72 | 74 | echo "" >> $GITHUB_STEP_SUMMARY |
73 | 75 | echo "Review changes to ensure they align with the intended protocol updates." >> $GITHUB_STEP_SUMMARY |
| 76 | +
|
| 77 | + # Post (or update) a sticky PR comment so reviewers can see the diff without |
| 78 | + # navigating to the Actions tab. The same comment is updated on subsequent |
| 79 | + # pushes via the `header` key. Skipped for PRs from forks where GITHUB_TOKEN |
| 80 | + # is read-only — the report is still available in the workflow summary and |
| 81 | + # as an uploaded artifact. |
| 82 | + - name: Build PR comment body |
| 83 | + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository |
| 84 | + id: comment_body |
| 85 | + run: | |
| 86 | + { |
| 87 | + echo 'body<<MCP_DIFF_EOF' |
| 88 | + echo '## 🔍 Everything Server MCP Interface Diff' |
| 89 | + echo '' |
| 90 | + if [ "${{ steps.mcp_diff.outputs.status }}" = "passed" ]; then |
| 91 | + echo '✅ **No interface changes detected** between this PR and its merge-base.' |
| 92 | + else |
| 93 | + echo '⚠️ **Interface changes detected** — review below to confirm they are intentional.' |
| 94 | + fi |
| 95 | + echo '' |
| 96 | + if [ -f conformance-report/CONFORMANCE_REPORT.md ]; then |
| 97 | + echo '<details><summary>Full report</summary>' |
| 98 | + echo '' |
| 99 | + tail -n +5 conformance-report/CONFORMANCE_REPORT.md |
| 100 | + echo '' |
| 101 | + echo '</details>' |
| 102 | + else |
| 103 | + echo '_Report file not found — see the workflow logs for details._' |
| 104 | + fi |
| 105 | + echo '' |
| 106 | + echo "<sub>Updated by [\`${{ github.workflow }}\`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) · commit \`${{ github.event.pull_request.head.sha }}\`</sub>" |
| 107 | + echo 'MCP_DIFF_EOF' |
| 108 | + } >> "$GITHUB_OUTPUT" |
| 109 | +
|
| 110 | + - name: Post / update sticky PR comment |
| 111 | + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository |
| 112 | + uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4 |
| 113 | + with: |
| 114 | + header: everything-server-mcp-diff |
| 115 | + message: ${{ steps.comment_body.outputs.body }} |
0 commit comments