Add manual workflow to mark all syndication cache entries as sent#176
Add manual workflow to mark all syndication cache entries as sent#176aarongustafson merged 4 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/aarongustafson/aaron-gustafson.com/sessions/5710e04c-c309-4c8c-bb46-27d76d18095a Co-authored-by: aarongustafson <75736+aarongustafson@users.noreply.github.com>
✅ Deploy Preview for aaron-gustafson ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds a manual, dispatch-only GitHub Actions workflow plus a companion script to bulk-update the syndication cache (.github/cache/syndication-status.json) so existing posts/links are treated as already sent across supported platforms, with optional live-feed fetching and a dry-run mode.
Changes:
- Introduces
.github/scripts/mark-all-sent.jsto stamp cache entries (and optionally feed items) as successful across the relevant platforms with amarkedManuallyflag. - Adds
.github/workflows/mark-all-sent.ymlto run the script viaworkflow_dispatch, reusing the existing syndication cache restore/save and concurrency patterns.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/mark-all-sent.yml | New manual workflow to restore the syndication cache, run the “mark all sent” script (optionally fetching feeds), then save the updated cache. |
| .github/scripts/mark-all-sent.js | New script to update all cache entries (and optionally feed items) to { success: true, markedManually: true } across configured platforms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot please review the PR feedback and adjust the PR |
Agent-Logs-Url: https://github.com/aarongustafson/aaron-gustafson.com/sessions/96f702b2-12c4-4105-93d3-9daa03e760f4 Co-authored-by: aarongustafson <75736+aarongustafson@users.noreply.github.com>
Done in e0981a5. Two fixes were applied to
|
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/aarongustafson/aaron-gustafson.com/sessions/4162ce74-28dd-4a2c-bf48-6223f1624174 Co-authored-by: aarongustafson <75736+aarongustafson@users.noreply.github.com>
Done in 5470f49. Both reviewer comments from that thread are addressed:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
.github/scripts/mark-all-sent.js— marks all cache entries (and optionally live feed items) as sent for all platforms.github/workflows/mark-all-sent.yml— manualworkflow_dispatchaction that restores cache, runs the script, and saves the updated cachecache[type]andcache[type][itemId].platformsinmarkAllPlatformsSuccessfulto handle partial/corrupt cache filesSetper content type to track unique item IDs, preventing double-counting whenalsoFetchFeedsoverlaps with existing cache entriesreadCache()now distinguishes ENOENT (bootstrap fresh) from a corrupt/unparseable file (throw with a clear message) to prevent silent data lossalsoFetchFeedsis enabled so the workflow exits non-zero instead of silently succeeding with incomplete data