Traffic-light tracker for student issue assignments in the S-AI-Projects GitHub org.
- Live: https://s-ai-projects.github.io/sai-project-tracker/
- Input:
data/assignments.csv(one row per student per task). - Output:
data/tracker.json(assignments joined with PR status from GitHub). - UI: React + Vite + shadcn/ui on GitHub Pages. No server.
Fetch dataworkflow: daily at 00:00 and 12:00 IST. Runsscripts/fetch-data.mjsand commitsdata/tracker.jsontomain.- Anyone logged in to GitHub can trigger it: the Refresh button opens a pre-filled
Refresh dataissue, and submitting it starts the workflow. The workflow comments and closes the issue. - Issue-triggered refreshes are limited to one every 15 minutes, measured from the last sync by anyone. Scheduled runs and manual runs (Actions > Fetch data > Run workflow) always run.
- The app reads
data/tracker.jsonstraight fromraw.githubusercontent.comat page load, so a data update needs no rebuild. GitHub caches raw files for up to 5 minutes. Deployworkflow: rebuilds and publishes the UI on pushes tomainthat touch app code. Data, script and markdown changes do not trigger it.
- The Activity tab shows a bar chart of commits per day across the org.
- Students push to their own forks, so the count is the commits inside pull requests (open, merged or closed) to the org repos.
- Each commit is counted once, on its author date in IST. Merge commits are excluded.
- The chart starts at
COMMITS_SINCEinscripts/fetch-data.mjs. - Commits that are pushed to a fork but not yet in a PR are not visible to the tracker.
- Green (
merged): linked PR is merged. - Yellow (
open): linked PR is open. - Red (
none): no PR, or only closed-unmerged PRs (recorded with stateclosed). - A PR is linked to an issue by a closing reference in its body (
Resolves S-AI-Projects/<repo>#7,Fixes #7, or the issue URL). - Fallback: Task ID in the PR title (
R01-T002: ...), looked up inassignments.csvfor that repo. - Several PRs on one issue: merged beats open beats closed.
npm install
npm run dev # UI, reads the published data file
GITHUB_TOKEN=ghp_xxx npm run fetch-data # optional, rewrites data/tracker.json locallyONLY_REPOS=Bash-Oneliner npm run fetch-datalimits the fetch, for testing.
- In the assignment sheet, open the
Task Issuestab, then File > Download > CSV. Save it asdata/assignments.csv. - Commit and push, then run the
Fetch dataworkflow.
- Requests time out after 20s and retry up to 4 times with backoff (1s, 2s, 4s).
- Repos are fetched 5 at a time with a 500ms pause between batches.
- On a rate limit the script waits for the reset if it is under 2 minutes, otherwise it fails and keeps the old
tracker.json. - Without
GITHUB_TOKENthe limit is 60 requests an hour, which is less than one full run. - Tune the constants at the top of
scripts/fetch-data.mjs.