Skip to content

Commit 94ae01f

Browse files
andrewshellclaude
andcommitted
chore: add conventional commits tooling and release-please
- Add commitlint with husky hooks to enforce commit format - Add release-please GitHub Action for automated releases - Bootstrap release-please at version 2.2.1 - Document commit types and release workflow in CLAUDE.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 10f209a commit 94ae01f

File tree

7 files changed

+653
-7
lines changed

7 files changed

+653
-7
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
release-type: node

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec commitlint --edit $1

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "2.2.1"
3+
}

CLAUDE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,39 @@ Uses MongoDB for storing subscriptions and resource state. Connection handled th
6868
- Unit tests in test/ directory using Mocha/Chai
6969
- Docker-based API testing with mock endpoints
7070
- Test fixtures and SSL certificates in test/keys/
71+
72+
## Commits and Releases
73+
74+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) enforced by commitlint via husky git hooks.
75+
76+
### Commit Format
77+
78+
```
79+
type: description
80+
81+
[optional body]
82+
```
83+
84+
### Commit Types
85+
86+
**Trigger releases:**
87+
- `fix:` - Bug fixes → patch release (2.2.1 → 2.2.2)
88+
- `feat:` - New features → minor release (2.2.1 → 2.3.0)
89+
- `feat!:` or `BREAKING CHANGE:` → major release (2.2.1 → 3.0.0)
90+
91+
**No release triggered:**
92+
- `chore:` - Maintenance tasks, dependencies
93+
- `docs:` - Documentation only
94+
- `style:` - Code style/formatting
95+
- `refactor:` - Code refactoring
96+
- `test:` - Adding/updating tests
97+
- `ci:` - CI/CD changes
98+
- `build:` - Build system changes
99+
100+
### Release Workflow
101+
102+
1. Push commits to `main`
103+
2. release-please automatically creates/updates a Release PR
104+
3. Review the Release PR (contains changelog and version bump)
105+
4. Merge the Release PR when ready to release
106+
5. release-please creates GitHub Release and git tag

commitlint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ['@commitlint/config-conventional'] };

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rsscloud-server",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "An rssCloud Server",
55
"main": "app.js",
66
"scripts": {
@@ -10,7 +10,8 @@
1010
"lint": "eslint --fix controllers/ services/ test/ *.js",
1111
"format": "prettier --write .",
1212
"test": "mocha",
13-
"test-api": "docker-compose up --build --abort-on-container-exit --attach rsscloud-tests --no-log-prefix"
13+
"test-api": "docker-compose up --build --abort-on-container-exit --attach rsscloud-tests --no-log-prefix",
14+
"prepare": "husky"
1415
},
1516
"engines": {
1617
"node": ">=22"
@@ -37,12 +38,15 @@
3738
"url": "https://github.com/andrewshell/rsscloud-server.git"
3839
},
3940
"devDependencies": {
41+
"@commitlint/cli": "^20.2.0",
42+
"@commitlint/config-conventional": "^20.2.0",
4043
"chai": "^4.3.4",
4144
"chai-http": "^4.3.0",
4245
"chai-json": "^1.0.0",
4346
"chai-xml": "^0.4.1",
4447
"eslint": "^9.29.0",
4548
"https": "^1.0.0",
49+
"husky": "^9.1.7",
4650
"mocha": "^11.7.1",
4751
"mocha-multi": "^1.1.7",
4852
"nodemon": "3.1.10",

0 commit comments

Comments
 (0)