This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-mcp-server.git
The following commit(s) were added to refs/heads/master by this push:
new 78a62ef fix: ignore change events that don't refer to a prompt file
(#8)
78a62ef is described below
commit 78a62ef56a707944a9bebe9c474160b7c418063a
Author: Robert Munteanu <[email protected]>
AuthorDate: Thu Mar 12 17:23:29 2026 +0100
fix: ignore change events that don't refer to a prompt file (#8)
---
.../sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
b/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
index 81b07a4..65bd247 100644
---
a/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
+++
b/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
@@ -63,6 +63,9 @@ public class RepositoryPromptsRegistrar {
try (ResourceResolver resolver =
rrf.getAdministrativeResourceResolver(null)) {
for (ResourceChange change : changes) {
+ if (!change.getPath().endsWith(".md")) {
+ continue;
+ }
if (change.getType() == ChangeType.REMOVED) {
String promptName =
getPromptName(change.getPath());
ServiceRegistration<DiscoveredPrompt> sr =
registrations.remove(promptName);