From 9c7dc43b6bbfaf4bf30690fc5d8f26b57a0a3634 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 21 Aug 2026 00:19:09 +0300 Subject: [PATCH] ci: widen the publish-attempt path list PR #1524 added `data/servers/io.decisionrules/server.json` and the detector logged `match=false`, so it was never auto-closed. The path list only knew `servers/**` at the repo root and exactly `data/seed.json`; putting the file under `data/servers/` is a natural guess given `data/seed.json` exists. Add `data/servers/**` plus root-level `server.json` / `servers.json`. Nothing legitimate lives at any of these paths today (`find` finds no server.json, servers.json or servers/ directory anywhere in the tree). The list stays explicit rather than becoming a broad `**/server.json` glob. The classifier only flags a PR when *every* changed file matches, which makes widening asymmetric: too narrow silently misses spam, too broad auto-closes a legitimate single-file PR. `internal/servers/service.go` and `data/servers.md` correctly do not match. Both copies of the list (stage 1 and stage 2) are updated identically, with a comment on each pointing at the other. Co-Authored-By: Claude Opus 5 (1M context) --- .../workflows/close-invalid-publish-prs.yml | 9 +++++++-- .../workflows/detect-invalid-publish-prs.yml | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/close-invalid-publish-prs.yml b/.github/workflows/close-invalid-publish-prs.yml index 934421b78..8666c3b24 100644 --- a/.github/workflows/close-invalid-publish-prs.yml +++ b/.github/workflows/close-invalid-publish-prs.yml @@ -34,7 +34,7 @@ jobs: COMMENT_BODY: | Hi @__AUTHOR__ 👋 — thanks for your interest in the MCP Registry! - It looks like this PR is trying to publish an MCP server by adding or editing files in this repository (under `servers/` or in `data/seed.json`). That isn't how servers get published, so I'm closing this PR automatically. + It looks like this PR is trying to publish an MCP server by adding or editing server files in this repository (under `servers/`, `data/servers/`, or in `data/seed.json`). That isn't how servers get published, so I'm closing this PR automatically. **Servers are published with the [`mcp-publisher`](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/quickstart.mdx) CLI**, not by opening a pull request against this repo. The CLI verifies that you own your namespace and submits your `server.json` directly to the live registry API. @@ -121,10 +121,15 @@ jobs: echo "No files for PR #$PR_NUMBER; skipping." exit 0 fi + # Keep this list in sync with the copy in stage 1. publish_attempt=0 other=0 for f in "${FILES[@]}"; do - if [[ "$f" == servers/* || "$f" == "data/seed.json" ]]; then + if [[ "$f" == servers/* \ + || "$f" == data/servers/* \ + || "$f" == "data/seed.json" \ + || "$f" == "server.json" \ + || "$f" == "servers.json" ]]; then publish_attempt=1 else other=1 diff --git a/.github/workflows/detect-invalid-publish-prs.yml b/.github/workflows/detect-invalid-publish-prs.yml index 355521b05..c200f86f4 100644 --- a/.github/workflows/detect-invalid-publish-prs.yml +++ b/.github/workflows/detect-invalid-publish-prs.yml @@ -48,12 +48,24 @@ jobs: mapfile -t FILES < <(gh api --paginate "repos/$GH_REPO/pulls/$PR_NUMBER/files" --jq '.[].filename') if [ "${#FILES[@]}" -gt 0 ]; then # Flag only if the PR touches *exclusively* publish-attempt files - # (servers/** and/or data/seed.json) and nothing else, so that - # legit PRs touching seed data alongside real code are left alone. + # and nothing else, so that legit PRs touching seed data + # alongside real code are left alone. + # + # Keep this list in sync with the copy in stage 2. It stays an + # explicit list rather than a broad `**/server.json` glob: + # because we require *every* file to match, an over-broad + # pattern would auto-close a legitimate single-file PR. + # data/servers/** is here because #1524 put its server.json + # there - a natural guess next to data/seed.json - and slipped + # through the original servers/**-only list. publish_attempt=0 other=0 for f in "${FILES[@]}"; do - if [[ "$f" == servers/* || "$f" == "data/seed.json" ]]; then + if [[ "$f" == servers/* \ + || "$f" == data/servers/* \ + || "$f" == "data/seed.json" \ + || "$f" == "server.json" \ + || "$f" == "servers.json" ]]; then publish_attempt=1 else echo "Non-publish file changed: $f"