With the configuration now based on a syncStartDate, the SyncService must be updated to dynamically fetch release data from GitHub instead of relying on a static list. This fetched data will be used by the archiving logic.
Acceptance Criteria
- A new private method,
#fetchAndCacheReleases(), is created in SyncService.mjs.
- This method is called once at the beginning of the
runFullSync() orchestration.
- It executes
gh release list --json tagName,publishedAt --limit 1000 to get all releases.
- It filters the fetched releases, keeping only those with a
publishedAt date on or after the syncStartDate from the config.
- It sorts the filtered releases by
publishedAt date in descending order (newest first).
- The resulting array of
{ tagName, publishedAt } objects is stored in an instance property (e.g., this.releases) for use by other methods during the sync.
Benefits
- Makes the archiving process fully automated and aware of the latest project releases.
- Eliminates the need for manual configuration updates when a new version is released.
- Ensures the service has an accurate, up-to-date list of all relevant releases.
With the configuration now based on a
syncStartDate, theSyncServicemust be updated to dynamically fetch release data from GitHub instead of relying on a static list. This fetched data will be used by the archiving logic.Acceptance Criteria
#fetchAndCacheReleases(), is created inSyncService.mjs.runFullSync()orchestration.gh release list --json tagName,publishedAt --limit 1000to get all releases.publishedAtdate on or after thesyncStartDatefrom the config.publishedAtdate in descending order (newest first).{ tagName, publishedAt }objects is stored in an instance property (e.g.,this.releases) for use by other methods during the sync.Benefits