mirror of
https://github.com/prdlk/leetcode.git
synced 2026-09-16 23:16:26 +00:00
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Spaced Repetition
|
|
|
|
# Opens (or refreshes) today's `Spaced Repetition — <Month D, YYYY>` 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 }}
|