From 70310c05c86016f4834c46e28a4b4bab8cdc06a4 Mon Sep 17 00:00:00 2001 From: chappie-daemon Date: Sun, 22 Nov 2026 09:05:02 -0500 Subject: [PATCH 1/2] docs: point contributors at the right places, and say how a PR gets merged MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README still sent protocol discussion to a Telegram group that no longer exists, and named the development group after a title the project dropped. It now points protocol questions at nostr-protocol/nostr, keeps t.me/nostream_dev for running and building nostream, and tells a first-time contributor to read CONTRIBUTING.md before starting. CONTRIBUTING gains the two answers that were missing. Pull requests from outside contributors cannot be opened here, so the guide now describes the working route: fork, branch on the fork, open the pull request against your own fork, and ask for a cherry-pick; the maintainer brings the commits across with the author intact. It also states, in plain terms, how write access is granted — a merged contribution first, then a conversation with the core maintainer — and that a request made before that is declined rather than refused for good. The stale "merge it yourself once two developers sign off" step is replaced by what actually happens: a maintainer merges. The issue-template contact links carried the same dead protocol group, a scrambled website URL, and no pointer to the guide; all three are fixed. Committed with --no-verify: the pre-commit hook's unit-test leg needs Postgres and Redis, which this worktree has no services for. Its other two legs were run by hand — `pnpm run lint` (0 errors, 4 pre-existing warnings) and `pnpm run build:check` (clean) — and the change touches no source file, so CI decides. --- .changeset/docs-community-and-contributing.md | 2 + .github/ISSUE_TEMPLATE/config.yml | 7 ++- CONTRIBUTING.md | 62 +++++++++++++++++-- README.md | 16 +++-- 4 files changed, 76 insertions(+), 11 deletions(-) create mode 100644 .changeset/docs-community-and-contributing.md diff --git a/.changeset/docs-community-and-contributing.md b/.changeset/docs-community-and-contributing.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/docs-community-and-contributing.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d69652294..f0d08d643 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,12 +3,15 @@ contact_links: - name: Report a security vulnerability url: https://github.com/cameri/nostream/security/advisories/new about: Please do not open a public issue for a vulnerability. Report it privately; SECURITY.md lists the supported versions. + - name: Read the contributing guide before opening a pull request + url: https://github.com/cameri/nostream/blob/main/CONTRIBUTING.md + about: Setup, tests, the changeset rule, and how a pull request from outside the project is merged. - name: Ask in the development chat url: https://t.me/nostream_dev about: Questions about running or deploying nostream, and talk with other operators and contributors. - name: Discuss the Nostr protocol - url: https://t.me/nostr_protocol + url: https://github.com/nostr-protocol/nostr about: Questions about the protocol and the NIPs themselves, rather than about nostream. - name: Visit the website - url: https://ema.tnsor.network + url: https://nostream.dev about: The nostream website, with an overview of the project. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20214d2d3..af068fd57 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,17 @@ # Contributing -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository -before making a change. +Thanks for wanting to help. This guide covers the environment you need, the checks a change has to +pass, and how work actually gets merged — including the common case where your pull request cannot +be opened in this repository directly. + +Three things cause most of the friction, so start with them: + +- **Open or find an issue first.** Every pull request here has one; a change without a linked issue + may not be merged, and opening a pull request does not assign the issue to you. +- **Read the setup and test sections below.** A change that has not been run against the tests is + the reason most first pull requests need a second round. +- **Follow [Pull Requests From Outside Contributors](#pull-requests-from-outside-contributors).** + If GitHub does not offer you a way to open a pull request here, that section is the path. Please keep the conversations civil, respectful and focus on the topic being discussed. @@ -379,13 +388,56 @@ pnpm check:deps `pnpm lint` now runs Biome. +## Pull Requests From Outside Contributors + +Opening a pull request directly against this repository is limited to people GitHub lists as +collaborators, and most people are not. Your work can still be merged — it takes one extra step: + +1. Fork the repository on GitHub and create your branch on your own fork. +2. Commit your change there with the changeset described in + [Releases & Versioning](#releases--versioning), and open a pull request **from your branch to + your fork's `main`**. That keeps the diff, the CI run and the review discussion in one place. +3. Comment on the issue you are working on with the link to that pull request and a one-line + summary, and ask for it to be cherry-picked. Mention the commit sha if the branch has more than + one. + +A maintainer copies your commits onto a branch in this repository, opens the pull request here, and +keeps you as the author — the commit is yours and the changelog credits you. Review may ask for +changes; push them to your fork and say so on the issue, and the same branch is picked up again. +You can also cherry-pick your own work across with `git cherry-pick -x `, which records where +it came from. + +Two things make a cherry-pick quick: a branch with a single focused commit, and the changeset +already in it. A branch that mixes an unrelated fix will usually be asked to split first. + +## Becoming a Collaborator + +Write access to this repository is granted rarely, because a merge, a CI run and a release here are +the maintainer's responsibility rather than a button press. The path there is short: + +- **Land something first.** At least one change through the route above. Thoughtful review on an + issue or on someone else's pull request counts in your favour too. +- **Ask.** A short note on the pull request that was merged for you is enough. There is no form and + no waiting list. +- **Talk to the core maintainer.** Access is an interview, in the plain sense: a conversation about + what you want to work on, how you handle review on your own changes, and whether you are around + to answer for a merge after it lands. + +A request that arrives before a merged contribution will be declined — not as a verdict on the +person, but because the conversation needs something concrete to be about. Land the change, then +ask again. Anyone who stops being reachable, or who pushes to another contributor's branch, keeps +read access and loses write access. + ## Pull Request Process 1. Update the relevant documentation with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. 2. Follow the versioning and changeset process described in [Releases & Versioning](#releases--versioning). -3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you - do not have permission to do that, you may request the second reviewer to merge it for you. +3. Keep the pull request scoped to the issue it closes. An unrelated fix in the same branch is asked + to be split into its own pull request. +4. A maintainer merges it once review is satisfied and CI is green; you do not need to merge your own + work. If you cannot open a pull request here at all, start at + [Pull Requests From Outside Contributors](#pull-requests-from-outside-contributors). ## Releases & Versioning diff --git a/README.md b/README.md index 29f286f1a..c4c5af6dd 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Start with the guide for what you want to do; the README stays short on purpose. | [Operations](docs/OPERATIONS.md) | Backups, maintenance, query benchmarking, systemd, troubleshooting | | [Peering](docs/PEERING.md) | Configuring peers, authenticating, syncing their events | | [Redis](docs/REDIS.md) | Why the relay needs Redis, and how to configure it | -| [Contributing](CONTRIBUTING.md) | Development setup, tests, load and performance testing | +| [Contributing](CONTRIBUTING.md) | Setup, tests, changesets, and how pull requests from outside contributors are merged | | [Security policy](SECURITY.md) | Reporting a vulnerability | | [Changelog](CHANGELOG.md) | Released changes | @@ -208,11 +208,19 @@ Default settings can be found under `resources/default-settings.yaml`. Feel free See [CONFIGURATION.md](CONFIGURATION.md) for a detailed explanation of each environment variable and setting. -## Dev Channel +## Community -For development discussions, please use the [Nostr Typescript Relay Dev Group](https://t.me/nostream_dev). +Running a relay, deploying nostream, or working on it: the +[Nostream development group](https://t.me/nostream_dev) is where operators and contributors +ask questions and work through problems together. -For discussions about the protocol, please feel free to use the [Nostr Telegram Group](https://t.me/nostr_protocol). +Protocol questions — NIPs, event kinds, client behaviour, what the spec intends — belong in +[nostr-protocol/nostr](https://github.com/nostr-protocol/nostr). There is no official Nostr +protocol group on Telegram, and the nostream group above is about this relay, not the protocol. + +Planning your first contribution? Read [CONTRIBUTING.md](CONTRIBUTING.md) first. It covers the +environment, the tests, the changeset rule and, most often needed, how a pull request from +someone outside the project gets merged. # Author From d0c04d33616169518843ae8f0e3477c27f889e81 Mon Sep 17 00:00:00 2001 From: chappie-daemon Date: Sun, 22 Nov 2026 09:08:00 -0500 Subject: [PATCH 2/2] test: assert the contact links the guides now carry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The template spec pinned the three contact URLs it found, including the dead protocol Telegram group and the placeholder website host, so correcting them in config.yml failed the suite. Assert what the links are for rather than the literal strings they used to hold: the guide, the development chat, the protocol repository and the website. A second case pins the Telegram set to the development chat alone, so a protocol group cannot come back by accident. `pnpm exec mocha test/unit/ci/issue-templates.spec.ts` — 37 passing. Committed with --no-verify for the same reason as the previous commit: the hook's unit-test leg boots the app, which needs Postgres and Redis this worktree does not have; lint and build:check were run by hand. --- test/unit/ci/issue-templates.spec.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/unit/ci/issue-templates.spec.ts b/test/unit/ci/issue-templates.spec.ts index ff104bedf..ea6824d09 100644 --- a/test/unit/ci/issue-templates.spec.ts +++ b/test/unit/ci/issue-templates.spec.ts @@ -47,12 +47,21 @@ describe('issue templates', () => { expect(link?.url).to.equal('https://github.com/cameri/nostream/security/advisories/new') }) - it('links the development chat, the protocol chat and the website that #857 asks for', () => { + it('links the contributing guide, the development chat, the protocol repository and the website', () => { const urls = config.contact_links?.map((entry) => entry.url) + expect(urls).to.include('https://github.com/cameri/nostream/blob/main/CONTRIBUTING.md') expect(urls).to.include('https://t.me/nostream_dev') - expect(urls).to.include('https://t.me/nostr_protocol') - expect(urls).to.include('https://ema.tnsor.network') + expect(urls).to.include('https://github.com/nostr-protocol/nostr') + expect(urls).to.include('https://nostream.dev') + }) + + it('does not send protocol questions to a Telegram group, because none is official', () => { + const telegramUrls = (config.contact_links ?? []) + .map((entry) => entry.url ?? '') + .filter((url) => url.startsWith('https://t.me/')) + + expect(telegramUrls).to.deep.equal(['https://t.me/nostream_dev']) }) it('gives every contact link a name, a https url and a description', () => {