Skip to content

Commit 3de0976

Browse files
dcramerclaude
andcommitted
fix(sync): Don't spread stale metadata when pulling commit from remote
When pulling commit metadata from remote, only set the commit field rather than spreading parent.metadata. The stale integration metadata in parent.metadata would overwrite fresh state from result.metadata in saveMetadata, reverting issue state changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d97cdde commit 3de0976

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core/github/sync.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,10 @@ export class GitHubSyncService {
332332
}
333333

334334
// Pull commit metadata if present in remote
335+
// Only set the commit field - don't spread parent.metadata as it may contain
336+
// stale integration metadata that would overwrite fresh state in saveMetadata
335337
if (remoteMetadata.commit?.sha && !parent.metadata?.commit?.sha) {
336338
localUpdates.metadata = {
337-
...parent.metadata,
338339
commit: remoteMetadata.commit,
339340
};
340341
}
@@ -363,7 +364,6 @@ export class GitHubSyncService {
363364
}
364365
}
365366

366-
367367
// Check if we can skip this update by comparing with GitHub
368368
if (skipUnchanged) {
369369
const expectedBody = this.renderBody(parent, descendants);

0 commit comments

Comments
 (0)