This Worker reads GitHub Discussions activity for the site and emails one weekly digest when there is new activity. It does not accept public feedback submissions.
chzhangtud/chzhangtud.github.io, create the Article feedback category, install the giscus app, and copy the public repository and category IDs from giscus.app into _config.yml.Create a D1 database, replace database_id in wrangler.toml locally, and apply the schema:
npx wrangler d1 execute chzhangtud-feedback-digest --remote --file migrations/0001_checkpoints.sql
Configure secrets. None of these values belong in Git:
npx wrangler secret put GITHUB_APP_ID
npx wrangler secret put GITHUB_INSTALLATION_ID
npx wrangler secret put GITHUB_APP_PRIVATE_KEY
npx wrangler secret put RESEND_API_KEY
npx wrangler secret put RESEND_FROM
npx wrangler secret put RESEND_TO
Install dependencies and deploy:
npm install
npx wrangler deploy
The cron expression runs Monday at 17:00 UTC, which is Monday morning in Pacific time. The Worker writes its checkpoint only after Resend accepts an email. An empty interval sends no email.