Skip to content

Commit 26f2df0

Browse files
committed
docs: address review (compose v2 note, rebase tip, commit example); chore: add setup:ci and engines
1 parent ebf9bd5 commit 26f2df0

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ github_tracker/
5555
4. Commit your work to your topic branch and push to your fork:
5656
```bash
5757
git add .
58-
git commit -m "feat: add contributor quick-start to README"
58+
git commit -m "docs(readme): add contributor quick-start"
5959
git push -u origin <topic-branch>
6060
```
6161
5. Open a Pull Request from `<your-username>:<topic-branch>` to `GitMetricsLab:main`.
@@ -65,6 +65,8 @@ github_tracker/
6565
git rebase upstream/main
6666
# if you've already pushed, use a safe update:
6767
git push --force-with-lease
68+
# Note: use --force-with-lease only on your own topic branch after a rebase.
69+
# Avoid force-pushing shared branches.
6870
```
6971

7072
### Commit Conventions
@@ -75,7 +77,7 @@ Use Conventional Commits. Examples:
7577
- `fix(auth): handle missing session cookie`
7678
- `feat(tracker): add contributor activity chart`
7779

78-
This helps with change logs and automated releases. See https://www.conventionalcommits.org/.
80+
This helps with change logs and automated releases. See [Conventional Commits](https://www.conventionalcommits.org/).
7981

8082
### Sign-offs / DCO (Optional)
8183

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Want to contribute? Here’s how to get started:
2222
```bash
2323
git fetch upstream && git rebase upstream/main
2424
```
25+
If you already pushed before the rebase:
26+
```bash
27+
git push --force-with-lease
28+
```
2529
4. **Make your changes** (e.g., edit `README.md` to improve instructions).
2630
5. **Commit and push**:
2731
```bash
@@ -92,12 +96,6 @@ Fallback (manual):
9296
npm install
9397
cd backend && npm install
9498
```
95-
> Tip: Use the project’s Node.js version. If you’ve set it in `.nvmrc` or `package.json#engines`, nvm will pick it up.
96-
>
97-
> With nvm:
98-
> ```bash
99-
> nvm use
100-
> ```
10199

102100
### 2. Configure environment variables (backend)
103101
Copy the sample env file and set required variables:
@@ -145,6 +143,9 @@ If the backend runs locally, it typically listens on <http://localhost:5000> (or
145143
146144
Alternatively, to start the full stack with Compose:
147145
146+
> Requires Docker Compose v2 (Docker Desktop or standalone Compose v2 CLI).
147+
> See https://docs.docker.com/compose/ for installation and upgrade instructions.
148+
148149
```bash
149150
# Dev profile (hot reload etc.)
150151
npm run docker:dev
@@ -188,7 +189,6 @@ npx jasmine --config=spec/support/jasmine.mjs
188189
# Use a test database (e.g., github_tracker_test) to avoid clobbering dev data
189190
MONGO_URI="mongodb://127.0.0.1:27017/github_tracker_test" npx jasmine --config=spec/support/jasmine.mjs
190191
# Or cross-platform with one command:
191-
# (one-time) npm install --save-dev cross-env # in the repository root
192192
npx cross-env MONGO_URI="mongodb://127.0.0.1:27017/github_tracker_test" jasmine --config=spec/support/jasmine.mjs
193193
```
194194

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",
6+
"engines": {
7+
"node": "18.20.x"
8+
},
69
"scripts": {
710
"dev": "vite --host",
811
"build": "vite build",
912
"lint": "eslint .",
1013
"preview": "vite preview",
11-
"setup": "npm install && npm --prefix backend install",
14+
"setup": "npm install && npm --prefix backend install",
15+
"setup:ci": "npm ci && npm --prefix backend ci",
16+
"backend:install": "npm --prefix backend install",
1217
"docker:dev": "docker compose --profile dev up --build",
1318
"docker:prod": "docker compose --profile prod up -d --build"
1419
},

0 commit comments

Comments
 (0)