You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e1a8f40
Browse filesBrowse the repository at this point in the historyBrowse files
feat(api): serve export data on data.devartslab.com via Worker + R2
Pull model: the Worker cron (*/15m) syncs both export files from GitHub
into R2; GET /v1/* serves filtered JSON from the bucket. A Bearer token
(PRIVATE_API_TOKEN secret) upgrades responses to the private dataset.
/v1/admin/sync forces a resync. No CF credentials needed on the GitHub
side.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
| --> data/repos.private.json (pushed to a private repo)
12
12
v
13
13
categories | overrides | filters
14
+
15
+
GitHub Action (every 6h) writes the files; the data.devartslab.com Worker
16
+
(cron */15m) pulls them into R2 and serves a filtered JSON API on top.
14
17
```
15
18
16
19
A scheduled GitHub Action runs the exporter every 6 hours (or on demand via `workflow_dispatch`), validates the output against the JSON schema, and commits `data/repos.public.json` back to this repo. `repos.private.json` is pushed to a separate private repo (see [Private output](#private-output)).
@@ -26,6 +29,7 @@ A scheduled GitHub Action runs the exporter every 6 hours (or on demand via `wor
See `examples/consumer.html` for a working browser page (serve it with `uv run python -m http.server`).
58
62
63
+
## API: data.devartslab.com
64
+
65
+
The `worker/` directory is a Cloudflare Worker serving both exports from R2 at `https://data.devartslab.com`. It syncs from GitHub every 15 minutes (cron) and also accepts `POST /v1/admin/sync` to force a refresh.
**Private dataset:** any `GET /v1/*` endpoint served with `Authorization: Bearer $PRIVATE_API_TOKEN` returns the private export instead (superset of the public one). On the private dataset, `visibility=private` is honored as an extra filter. Authed responses are never cached.
npx wrangler secret put GH_EXPORT_TOKEN # cron fetch of the private export
95
+
npx wrangler secret put PRIVATE_API_TOKEN # consumer bearer for private dataset
96
+
```
97
+
98
+
CI deploys are intentionally not wired yet (needs a scoped Cloudflare API token; the wrangler OAuth token expires and should not be stored in repo secrets).
0 commit comments