Skip to content

Commit ad5bf3f

Browse files
inexistenzzCopilot
andcommitted
ci: post sticky PR comment with MCP diff report
Surface the Everything server interface diff directly on the PR instead of requiring reviewers to dig into the Actions tab. - Add 'pull-requests: write' permission - Capture mcp-server-diff status output via step id - Build a comment body that summarises the status and includes the full report in a collapsed <details> block - Post via marocchino/sticky-pull-request-comment (SHA-pinned to v3.0.4) using a stable header so subsequent pushes update the same comment - Guarded to same-repo PRs only; fork PRs still get the summary and uploaded artifact Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4424981 commit ad5bf3f

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/everything-mcp-diff.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828

2929
permissions:
3030
contents: read
31+
pull-requests: write
3132

3233
concurrency:
3334
group: ${{ github.workflow }}-${{ github.ref }}
@@ -46,6 +47,7 @@ jobs:
4647
ref: ${{ github.event.inputs.target_ref || github.ref }}
4748

4849
- name: Run MCP Server Diff
50+
id: mcp_diff
4951
uses: SamMorrowDrums/mcp-server-diff@f7e5e58a4b0c4f68a5827adad2292953bb1ab9ef # v2.3.5
5052
with:
5153
setup_node: 'true'
@@ -71,3 +73,43 @@ jobs:
7173
echo "- New resources, prompts, or capabilities" >> $GITHUB_STEP_SUMMARY
7274
echo "" >> $GITHUB_STEP_SUMMARY
7375
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

Comments
 (0)