Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 4.02 KB

CONTRIBUTING.md

File metadata and controls

74 lines (49 loc) · 4.02 KB

Contributing to DevForge

This repo is the club's website and member portal at devforge.club. It's also where milestone 2 of the 10 PR Journey happens: your first real code change, reviewed by a maintainer who wants you to succeed.

Haven't done milestone 1 yet? Sign the workbook first: NST-DEVFORGE/workbook.

1. Pick an issue

  • Browse good first issue. Each one names the file, says what "done" means, and estimates the diff size.
  • Comment /assign on it. A bot assigns you straight away if it's free. That's your go-ahead: no code before it, so two people never fix the same thing.
  • One issue at a time. The bot won't assign you a second one while you have an open issue. Finish it, or comment /unassign to hand it back.
  • If you go quiet on an assigned issue for over a week, a maintainer may unassign you so someone else can pick it up.
  • Found something that isn't listed? Open an issue with the Improvement or Bug report template first.

2. Set up

You need Node 24 and npm.

# fork on GitHub first, then:
git clone https://github.com/<you>/DevForge.git
cd DevForge
git remote add upstream https://github.com/NST-DEVFORGE/DevForge.git
npm install
npm run dev          # http://localhost:3000

No secrets needed. The public pages, the build and the tests all run without any .env file. Pages that need the member portal's database (sign-in, dashboard, admin) show an error locally. That's expected, and none of the good first issues need them.

3. Make the change

git checkout main && git pull upstream main
git checkout -b fix/<issue-number>-<short-name>     # e.g. fix/37-navbar-next-image
  • Keep it small: under ~50 lines, and only what the issue asks for. Found something else along the way? Open a new issue for it.
  • Match the code around you: its naming, comment style and Tailwind patterns.

Before you push, run exactly what CI runs:

npm run lint     # ESLint
npm test         # Vitest unit tests (lib/**/*.test.ts)
npm run build    # type-check + production build

4. Open the pull request

  • Title: what changed, e.g. Navbar logo: use next/image.
  • Fill in the PR template. Include Fixes #<issue>, how you tested it, and a screenshot for anything visible.
  • CI must be green: the Lint, Test and Type-check & build checks. If one fails, open the log, fix it and push again. Don't ask someone else to re-run it.

"Pull request creation failed: must be a collaborator"

You opened the PR between two branches of this repo instead of from your fork. Only maintainers can do that. Go to your fork, click Contribute → Open pull request, and check the bar reads:

base repository: NST-DEVFORGE/DevForge · base: main ← head repository: <you>/DevForge · compare: <your branch>

If you only see branch dropdowns, click compare across forks. Never pick main as the compare side: that's our code, not yours.

5. Review

  • Two members of the governance council are requested as reviewers automatically, and one approval is needed to merge. Reply to every comment: change the code, or explain your reasoning once.
  • Push follow-up commits to the same branch. Don't close the PR and open a new one.
  • When it's merged, log the PR URL on milestone 2 of the workbook and write your reflection within 48 hours.

Writing tests

Tests use Vitest and live next to the code: lib/foo.ts → lib/foo.test.ts. See lib/github-auth.test.ts for the house style. A good test fails when the code is broken, so break the line you're testing on purpose once, and watch the test go red.

Deployments

Only main deploys to devforge.club, via Vercel. Pull requests don't get preview deployments; CI (GitHub Actions) is what checks your PR.