Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes contributor-facing documentation by moving duplicated development/testing guidance out of the README into CONTRIBUTING.md, and adds clearer contribution process expectations (issue assignment fairness, Husky hooks, and changeset rules).
Changes:
- Added an “Issue Assignment & Fairness Policy” and consolidated dev setup/testing/load-testing guidance into
CONTRIBUTING.md. - Simplified
README.mdby replacing duplicated dev/test/load-testing sections with a pointer toCONTRIBUTING.md. - Added an empty Changesets file to satisfy CI for a docs-only change.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| README.md | Removes a large duplicated dev/testing section and links contributors to CONTRIBUTING.md. |
| CONTRIBUTING.md | Adds fairness policy and centralizes dev setup, testing, and load-testing instructions. |
| .changeset/sparkly-times-win.md | Adds an empty changeset for a docs-only PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ``` | ||
| DB_URI="postgresql://postgres:postgres@localhost:5432/nostr_ts_relay_test" | ||
| DB_USER=postgres | ||
| ``` |
There was a problem hiding this comment.
npm run db:migrate uses the Knex CLI + knexfile.js, which currently reads DATABASE_URI (not DB_URI). With the DB_URI example shown here, a contributor may run migrations against the wrong/default DB. Please adjust the docs to mention DATABASE_URI/DB_HOST variables for migrations, or otherwise align the examples with what Knex actually consumes.
| npm run test:unit:watch | ||
| ``` | ||
| For development environment setup, testing, linting, load testing, and contribution guidelines | ||
| (including the issue fairness policy, husky pre-commit hooks, and changeset workflow), see |
There was a problem hiding this comment.
The README link text mentions "husky pre-commit hooks" in lowercase. Elsewhere in the repo (and in CONTRIBUTING just below) the tool name is capitalized as "Husky"; please keep this consistent.
| (including the issue fairness policy, husky pre-commit hooks, and changeset workflow), see | |
| (including the issue fairness policy, Husky pre-commit hooks, and changeset workflow), see |
| ## Development & Contributing | ||
|
|
||
| Clone repository and enter directory: | ||
| ``` | ||
| git clone git@github.com:Cameri/nostream.git | ||
| cd nostream | ||
| ``` | ||
|
|
||
| Start: | ||
| ``` | ||
| ./scripts/start | ||
| ``` | ||
|
|
||
| This will run in the foreground of the terminal until you stop it with Ctrl+C. | ||
|
|
||
| ## Tests | ||
|
|
||
| ### Linting and formatting (Biome) | ||
|
|
||
| Run code quality checks with Biome: | ||
|
|
||
| ``` | ||
| npm run lint | ||
| npm run lint:fix | ||
| npm run format | ||
| npm run format:check | ||
| ``` | ||
|
|
||
| ### Unit tests | ||
|
|
||
| Open a terminal and change to the project's directory: | ||
| ``` | ||
| cd /path/to/nostream | ||
| ``` | ||
|
|
||
| Run unit tests with: | ||
|
|
||
| ``` | ||
| npm run test:unit | ||
| ``` | ||
|
|
||
| Or, run unit tests in watch mode: | ||
|
|
||
| ``` | ||
| npm run test:unit:watch | ||
| ``` | ||
| For development environment setup, testing, linting, load testing, and contribution guidelines | ||
| (including the issue fairness policy, husky pre-commit hooks, and changeset workflow), see | ||
| [CONTRIBUTING.md](CONTRIBUTING.md). |
There was a problem hiding this comment.
This section now points readers to CONTRIBUTING.md for dev setup/testing, but the README still contains a long "Quick Start (Standalone)" block above with env vars, migrations, and npm run dev steps. That appears to conflict with the PR description about deduplicating dev setup from the README; consider removing or significantly shortening the standalone quick-start section in README (or reframing it as end-user runtime docs) to avoid duplication and mixed guidance.
| > **Important:** Pre-commit hooks installed by Husky run linting and formatting checks on every | ||
| > commit. Do **not** bypass them with `git commit --no-verify`. If a hook fails, fix the reported | ||
| > issues before committing. |
There was a problem hiding this comment.
The note about Husky pre-commit hooks says they run "linting and formatting checks on every commit", but the actual .husky/pre-commit hook runs npm run lint, npm run build:check, and npm run test:unit (no formatting check). Please update the text to match the enforced commands (or adjust the hook if formatting is intended).
| > **Important:** Pre-commit hooks installed by Husky run linting and formatting checks on every | |
| > commit. Do **not** bypass them with `git commit --no-verify`. If a hook fails, fix the reported | |
| > issues before committing. | |
| > **Important:** Pre-commit hooks installed by Husky run linting, build checks, and unit tests on | |
| > every commit. Do **not** bypass them with `git commit --no-verify`. If a hook fails, fix the | |
| > reported issues before committing. |
| Set the required environment variables (or copy `.env.example` to `.env` and edit it): | ||
|
|
||
| ``` | ||
| DB_URI="postgresql://postgres:postgres@localhost:5432/nostr_ts_relay_test" | ||
| DB_USER=postgres | ||
| ``` | ||
|
|
||
| or: | ||
|
|
||
| ``` | ||
| DB_HOST=localhost | ||
| DB_PORT=5432 | ||
| DB_NAME=nostr_ts_relay | ||
| DB_USER=postgres | ||
| DB_PASSWORD=postgres | ||
| ``` |
There was a problem hiding this comment.
The standalone dev env var examples use postgres credentials and a nostr_ts_relay_test database in the DB URI. This conflicts with .env.example and docker-compose.yml, which default to DB_USER/DB_PASSWORD/DB_NAME=nostr_ts_relay. To avoid confusing contributors, align these examples with .env.example (or make them clearly placeholders) and reserve the _test database naming for the integration-test section only.
0325b0a to
2ed271b
Compare
…uidance, and deduplicate README Agent-Logs-Url: https://github.com/cameri/nostream/sessions/c6b93441-302b-436f-92b4-cb1ca5bbcce9 Co-authored-by: cameri <378886+cameri@users.noreply.github.com>
c5e536f to
74a67d7
Compare
690146b(empty "Initial plan") and0aa0163("docs(changeset):" missing subject)copilot/revamp-contributing-workflow-v2off current main tip (3c78e61)docs(changeset): add empty changeset for docs-only PRdocs: revamp CONTRIBUTING.md with fairness policy, dev setup, husky guidance, and deduplicate README