ework-web 0.10.103 → 0.10.105
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/store.ts +1 -0
- package/src/upstream-sync.ts +4 -1
- package/src/webhooks.ts +4 -0
package/package.json
CHANGED
package/src/store.ts
CHANGED
package/src/upstream-sync.ts
CHANGED
|
@@ -258,7 +258,10 @@ export class UpstreamSync {
|
|
|
258
258
|
if (!local) continue;
|
|
259
259
|
const gcAuthor = gc.user?.login ?? "upstream";
|
|
260
260
|
await ensureUser(gcAuthor, fromGithubBot(gcAuthor) ? "bot" : "human");
|
|
261
|
-
|
|
261
|
+
// invisible provenance marker (same as importIssueComments): ework-mirror
|
|
262
|
+
// skips events carrying it, so synced-in comments never echo upstream
|
|
263
|
+
const body = (gc.body ?? "") + "\n\n<!-- upstream-sync -->";
|
|
264
|
+
const row = await postComment(local.id, body, gcAuthor, {
|
|
262
265
|
createdAt: gc.created_at,
|
|
263
266
|
updatedAt: gc.updated_at,
|
|
264
267
|
upstreamCommentId: gc.id,
|
package/src/webhooks.ts
CHANGED
|
@@ -307,6 +307,9 @@ interface PayloadComment {
|
|
|
307
307
|
updated_at: string;
|
|
308
308
|
user: PayloadUser;
|
|
309
309
|
author_kind?: string;
|
|
310
|
+
/** Set when this comment was imported from an upstream tracker — receivers
|
|
311
|
+
* must skip echoing it back (defense beyond the body marker). */
|
|
312
|
+
upstream_comment_id?: number | null;
|
|
310
313
|
}
|
|
311
314
|
|
|
312
315
|
interface IssueEventPayload {
|
|
@@ -467,6 +470,7 @@ function buildComment(
|
|
|
467
470
|
body: comment.body,
|
|
468
471
|
created_at: comment.created_at,
|
|
469
472
|
updated_at: comment.updated_at,
|
|
473
|
+
upstream_comment_id: comment.upstream_comment_id ?? null,
|
|
470
474
|
user: buildUser(comment.author, origin),
|
|
471
475
|
};
|
|
472
476
|
}
|