Stop failing sync over already-sent campaigns still in the repo
CI / test (push) Successful in 9s

A campaign.md is meant to stay around after it's sent as a record of what
went out and when. Treating any non-draft campaign as a hard rejection
forced deleting it just to keep CI green, and there was no way to fail on
resolving a stale list/attachment reference either -- an archived
campaign has nothing left to resolve, so check status before doing any of
that work. Non-draft campaigns now report as a distinct, non-error
"skipped" bucket instead of "rejected".
This commit is contained in:
2026-08-13 13:24:39 -04:00
parent 0c8bc6bd3b
commit 34d61c2e69
4 changed files with 64 additions and 16 deletions
+3
View File
@@ -81,6 +81,9 @@ func runSync(lm *listmonk.Client, path string) {
}
log.Printf("synced: %v", result.Synced)
log.Printf("unchanged: %v", result.Unchanged)
if len(result.Skipped) > 0 {
log.Printf("skipped (already sent): %v", result.Skipped)
}
if len(result.Rejected) > 0 {
log.Printf("rejected: %v", result.Rejected)
}