From e23a68c91c0de1ddcea0456dbc512efa935fac18 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 29 Aug 2026 17:26:01 -0400 Subject: [PATCH] =?UTF-8?q?ci(ci):=20add=20spaced=E2=80=91repetition=20Git?= =?UTF-8?q?Hub=20Actions=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/spaced-repetition.yml | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/spaced-repetition.yml diff --git a/.github/workflows/spaced-repetition.yml b/.github/workflows/spaced-repetition.yml new file mode 100644 index 0000000..c436d34 --- /dev/null +++ b/.github/workflows/spaced-repetition.yml @@ -0,0 +1,47 @@ +name: Spaced Repetition + +# Opens (or refreshes) today's `Spaced Repetition — ` issue from +# the problem issues closed 3 and 7 days ago. No stored state: the script +# recomputes both windows from the tracker's close dates on every run, keyed by +# the ET date in the title, so a re-run rewrites one body instead of stacking +# duplicates and a missed day simply never appears. + +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. + - run: bun apps/cli/spaced-repetition.ts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DRY_RUN: ${{ inputs.dry_run }} + SRS_TODAY: ${{ inputs.date }}