Update structure for tracking projects - #346
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ Deploy Preview for made-in-nigeria-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR restructures how projects are tracked by moving the source-of-truth to data/projects.json, generating derived artifacts (README + enriched metadata) via scripts, and wiring CI workflows to validate/enrich/regenerate automatically.
Changes:
- Introduces Node scripts to validate
data/projects.json, generateREADME.MD, and enrich projects via the GitHub API intodata/projects.enriched.json. - Updates the web app data source to read from
data/projects.enriched.json(while keeping a legacy-compatible shape for existing components). - Adds GitHub Actions workflows for PR validation, scheduled enrichment, and README regeneration.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/validate-projects.mjs | Adds CI validation for data/projects.json schema/constraints. |
| scripts/utils.mjs | Shared helpers/constants for scripts (paths + JSON read/write). |
| scripts/migrate-readme.mjs | One-time migration from README.MD to data/projects.json. |
| scripts/generate-readme.mjs | Generates README.MD from data/projects.json. |
| scripts/enrich-projects.mjs | Enriches project data by querying the GitHub API and writing data/projects.enriched.json. |
| scripts/bootstrap-enriched.mjs | Bootstraps an initial projects.enriched.json without API calls. |
| data/projects.json | Introduces the canonical JSON list of projects. |
| contributing.md | Updates contribution instructions to the new JSON + automation pipeline. |
| app/utils/projects.ts | Switches project loading from README scraping to enriched JSON import + normalization. |
| .github/workflows/validate-pr.yml | Adds PR-time validation when data/projects.json changes. |
| .github/workflows/generate-readme.yml | Adds workflow to regenerate/commit README after merges. |
| .github/workflows/enrich-projects.yml | Adds scheduled workflow to enrich/commit project metadata weekly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| schedule: | ||
| # Every Monday at 02:00 UTC | ||
| - cron: "0 2 * * 1" |
There was a problem hiding this comment.
github actions have a terrible reputation when it comes to running them as background jobs. this may end up running at a later time, which can be acceptable to some extent, but sometimes it may not even run at all, due to high demand at gh's end or so.
i'd suggest we expose this via an endpoint that we can hit with upstash. wdyt?
There was a problem hiding this comment.
Ah I see. Valid concerns. I'd like to give it a go for a bit and see how that goes first? But keeping the upstash option in the pocket if it's needed @kaf-lamed-beyt. Thanks
kaf-lamed-beyt
left a comment
There was a problem hiding this comment.
LGTM! just the gh action suggestion i made, which can be revisited if it doesn't work as intended.
What does this PR do?
This PR explores quality of life improvements that:
Type of change
How should this be tested?
Via GitHub workflows