mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-16 16:36:53 +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:
parent
573ebe0918
commit
af0cf0d7c8
@ -104,11 +104,13 @@ function applySync(repo, options = {}, context = {}) {
|
|||||||
const body = mergeIssueBody(issue, nextState, policy);
|
const body = mergeIssueBody(issue, nextState, policy);
|
||||||
const labelPlan = syncIssueLabels(repo, issue, nextState, policy, options);
|
const labelPlan = syncIssueLabels(repo, issue, nextState, policy, options);
|
||||||
|
|
||||||
if (!options.dryRun && normalizeBodyForComparison(body) !== normalizeBodyForComparison(issue.body)) {
|
let snapshot = null;
|
||||||
|
if (!options.dryRun) {
|
||||||
|
if (normalizeBodyForComparison(body) !== normalizeBodyForComparison(issue.body)) {
|
||||||
editIssue(repo, issue.number, { body }, options);
|
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({
|
results.push({
|
||||||
...summarizeStateForOutput(repo, trackedIssue, nextState, 'sync', policy),
|
...summarizeStateForOutput(repo, trackedIssue, nextState, 'sync', policy),
|
||||||
syncedAt,
|
syncedAt,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user