add brain
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Changelog Formatting Guide
|
||||
|
||||
Use Keep a Changelog section ordering:
|
||||
|
||||
1. Security
|
||||
2. Added
|
||||
3. Changed
|
||||
4. Deprecated
|
||||
5. Removed
|
||||
6. Fixed
|
||||
|
||||
Rules:
|
||||
|
||||
- One bullet = one user-visible change.
|
||||
- Lead with impact, not implementation detail.
|
||||
- Keep bullets short and actionable.
|
||||
- Include migration note for breaking changes.
|
||||
@@ -0,0 +1,26 @@
|
||||
# CI Integration Examples
|
||||
|
||||
## GitHub Actions
|
||||
|
||||
```yaml
|
||||
name: Changelog Check
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: python3 engineering/changelog-generator/scripts/commit_linter.py \
|
||||
--from-ref origin/main --to-ref HEAD --strict
|
||||
```
|
||||
|
||||
## GitLab CI
|
||||
|
||||
```yaml
|
||||
changelog_lint:
|
||||
image: python:3.12
|
||||
stage: test
|
||||
script:
|
||||
- python3 engineering/changelog-generator/scripts/commit_linter.py --to-ref HEAD --strict
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
# Monorepo Changelog Strategy
|
||||
|
||||
## Approaches
|
||||
|
||||
| Strategy | When to use | Tradeoff |
|
||||
|----------|-------------|----------|
|
||||
| Single root changelog | Product-wide releases, small teams | Simple but loses package-level detail |
|
||||
| Per-package changelogs | Independent versioning, large teams | Clear ownership but harder to see full picture |
|
||||
| Hybrid model | Root summary + package-specific details | Best of both, more maintenance |
|
||||
|
||||
## Commit Scoping Pattern
|
||||
|
||||
Enforce scoped conventional commits to enable per-package filtering:
|
||||
|
||||
```
|
||||
feat(payments): add Stripe webhook handler
|
||||
fix(auth): handle expired refresh tokens
|
||||
chore(infra): bump base Docker image
|
||||
```
|
||||
|
||||
**Rules:**
|
||||
- Scope must match a package/directory name exactly
|
||||
- Unscoped commits go to root changelog only
|
||||
- Multi-package changes get separate scoped commits (not one mega-commit)
|
||||
|
||||
## Filtering for Package Releases
|
||||
|
||||
```bash
|
||||
# Generate changelog for 'payments' package only
|
||||
git log v1.3.0..HEAD --pretty=format:'%s' | grep '^[a-z]*\(payments\)' | \
|
||||
python3 scripts/generate_changelog.py --next-version v1.4.0 --format markdown
|
||||
```
|
||||
|
||||
## Ownership Model
|
||||
|
||||
- Package maintainers own their scoped changelog
|
||||
- Platform/infra team owns root changelog
|
||||
- CI enforces scope presence on all commits touching package directories
|
||||
- Root changelog aggregates breaking changes from all packages for visibility
|
||||
Reference in New Issue
Block a user