ework-web 0.10.60 → 0.10.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/webhooks.ts +8 -4
package/package.json
CHANGED
package/src/webhooks.ts
CHANGED
|
@@ -696,11 +696,15 @@ export async function emitCommentEvent(
|
|
|
696
696
|
log.info(`webhook: issue dispatch disabled — skipping comment_created (author=${comment.author}) for ${scopeKey}#${issue.number}`);
|
|
697
697
|
return;
|
|
698
698
|
}
|
|
699
|
-
// Global/project-level are "default no auto-dispatch" strategies — comments can still explicitly wake AI.
|
|
700
|
-
if (cfg["dispatchEnabled"] === "false" || cfg[`dispatchOff:${scopeKey}`] === "1") {
|
|
701
|
-
log.info(`webhook: dispatch disabled but waking via comment_created (author=${comment.author}) for ${scopeKey}#${issue.number}`);
|
|
702
|
-
}
|
|
703
699
|
const authorUser = await getUserByLogin(comment.author);
|
|
700
|
+
const dispatchOff = cfg["dispatchEnabled"] === "false" || cfg[`dispatchOff:${scopeKey}`] === "1";
|
|
701
|
+
if (dispatchOff && authorUser && authorUser.kind !== "human") {
|
|
702
|
+
log.info(`webhook: dispatch disabled — non-human comment blocked (author=${comment.author} kind=${authorUser.kind}) for ${scopeKey}#${issue.number}`);
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
if (dispatchOff) {
|
|
706
|
+
log.info(`webhook: dispatch disabled but human comment waking AI (author=${comment.author}) for ${scopeKey}#${issue.number}`);
|
|
707
|
+
}
|
|
704
708
|
const appCfg = await loadConfig();
|
|
705
709
|
const cfgList = (k: string, d: string) =>
|
|
706
710
|
(cfg[k] ?? d).split(",").map((s) => s.trim()).filter(Boolean);
|