name: Spaced Repetition # Opens (or refreshes) today's `Spaced Repetition — ` issue from # whatever the SRS ladder has due (`POST /admin/due`, the same rows the 8 AM # digest mails — so the two cannot disagree). The script stores nothing and # schedules nothing: it asks D1 what is standing today, keyed by the ET date in # the title, so a re-run rewrites one body instead of stacking duplicates. # Sunday is the rest day and the ladder never books it, so nothing is written. on: schedule: # 10:00 UTC = 06:00 ET while the campaign runs (EDT through Nov 1), 05:00 ET # after. No DST guard and no second cron: the issue is keyed by ET calendar # date, not by the hour it was created, so the drift is cosmetic. - cron: "0 10 * * *" workflow_dispatch: inputs: dry_run: description: Print the issue body without creating or updating anything type: boolean default: false date: description: ET date to treat as today (YYYY-MM-DD) — backfill a missed day type: string default: "" permissions: contents: read issues: write concurrency: group: spaced-repetition cancel-in-progress: false jobs: drill: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 # No install step: the script only uses Bun builtins + fetch. # # SRS_ADMIN_KEY reads today's due list from the Worker. Unset is fatal # here, unlike in close-solved: without D1 there is no schedule to render, # and inventing one from issue close dates is exactly the second source of # truth this replaced. - run: bun apps/cli/spaced-repetition.ts env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DRY_RUN: ${{ inputs.dry_run }} SRS_TODAY: ${{ inputs.date }} SRS_ADMIN_KEY: ${{ secrets.SRS_ADMIN_KEY }}