mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-23 16:41:22 +08:00
fix: guard upsertCoordinationWorkItem behind dryRun check in applySync
The store write was unconditional, persisting work items even during dry runs. Move it inside the !dryRun block alongside editIssue and initialize snapshot to null beforehand so results.push still receives snapshot: null for dry runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,11 +104,13 @@ function applySync(repo, options = {}, context = {}) {
|
||||
const body = mergeIssueBody(issue, nextState, policy);
|
||||
const labelPlan = syncIssueLabels(repo, issue, nextState, policy, options);
|
||||
|
||||
if (!options.dryRun && normalizeBodyForComparison(body) !== normalizeBodyForComparison(issue.body)) {
|
||||
editIssue(repo, issue.number, { body }, options);
|
||||
let snapshot = null;
|
||||
if (!options.dryRun) {
|
||||
if (normalizeBodyForComparison(body) !== normalizeBodyForComparison(issue.body)) {
|
||||
editIssue(repo, issue.number, { body }, options);
|
||||
}
|
||||
snapshot = upsertCoordinationWorkItem(store, repo, trackedIssue, nextState, 'sync', { ...context, policy });
|
||||
}
|
||||
|
||||
const snapshot = upsertCoordinationWorkItem(store, repo, trackedIssue, nextState, 'sync', { ...context, policy });
|
||||
results.push({
|
||||
...summarizeStateForOutput(repo, trackedIssue, nextState, 'sync', policy),
|
||||
syncedAt,
|
||||
|
||||
Reference in New Issue
Block a user