Files
wizardchen 143ec0c96d fix(plugin): make the Jira example's syncs resumable and complete
Full syncs only walked the projects selected now, so the issues of a
project deselected since the last sync were neither reported deleted nor
kept in the cursor, and stayed in the knowledge base for good. Incremental
syncs dropped such projects from the cursor too. Now every sync keeps the
issues of deselected projects, and a full sync reports whatever the last
sync had and it did not list, deselected projects included.

A full sync started from zero on every retry, and its OAuth token,
resolved once per call, expires after about an hour: a long full sync
never finished. Its checkpoints now carry how far each project's listing
got (the newest update listed, as issues come oldest first) and the
issues seen so far, so a retry, with a fresh token, goes on from there
and still reconciles deletions. An incremental sync after an abandoned
full sync keeps what it listed.

The binaries are built without cgo and ran on Windows without a zone
database: loading the user's time zone failed and the queries silently
used UTC while Jira reads them in the user's zone, missing a window of
changes. The zone database is now linked in, and when Jira does not
reveal the zone the query looks back 12 hours more (no zone is further
behind UTC) and the sync logs a warning.

The docs had users register delete events and promised immediate syncs,
but the webhook only starts incremental syncs, which never see deleted
issues. A delete event now also leaves a note in the plugin's key-value
store (new kv scope) for a week; incremental syncs report a noted issue
of theirs once Jira confirms it is gone, so a forged event on an unsigned
webhook deletes nothing.

An OAuth field without a token (never connected, or a connection that
can no longer be refreshed) now answers unauthorized, as the SDK asks,
still pointing at the field. Version 1.1.0.
2026-09-26 21:48:28 +08:00
..