quality / commitlint (push) Skipped
CD / update-wiki (push) Successful in 6s
quality / changes (push) Successful in 4s
quality / docker-check (push) Skipped
quality / web (push) Successful in 57s
quality / api (push) Successful in 41s
CD / quality (push) Successful in 1m46s
CD / publish (push) Successful in 11m48s
Без type/scope semantic-release не ставил тег и пропускал bake.
71 lines
2.4 KiB
Markdown
71 lines
2.4 KiB
Markdown
# Contributing
|
|
|
|
## Gitflow
|
|
|
|
- **main** — production; merges only from `release/*` and `hotfix/*`
|
|
- **develop** — integration branch (default for development)
|
|
- **feature/\*** — `feature/[issue-id]-description` from `develop`
|
|
- **release/vX.Y.Z** — stabilization from `develop`
|
|
- **hotfix/vX.Y.Z** — urgent fixes from `main`
|
|
|
|
## Commits
|
|
|
|
**Обязательно** Conventional Commits — иначе semantic-release на `main` не создаст тег и **не опубликует Docker-образ**.
|
|
|
|
Формат: `type(scope): описание на русском`
|
|
|
|
| Type | Релиз |
|
|
|------|--------|
|
|
| `feat` | minor |
|
|
| `fix`, `perf`, `ci`, `refactor` | patch |
|
|
| `docs`, `chore`, `test`, `style`, `build` | нет |
|
|
|
|
Scope — один идентификатор без запятых (`web`, `api`, `ci`, `docker`, `fleet`).
|
|
Локально: husky `.husky/commit-msg` → `commitlint`. Шаблон: [`.gitmessage`](.gitmessage) (`git config commit.template .gitmessage`).
|
|
Правила Cursor: [`.cursor/rules/commit-messages-ru.mdc`](.cursor/rules/commit-messages-ru.mdc).
|
|
|
|
Плохо: `Init Commit`, `Update CDN Manager: Add…`.
|
|
Хорошо: `feat(fleet): добавить CRUD нод и алиасов`.
|
|
|
|
## Pull requests
|
|
|
|
- Target `develop` for features; `main` for release/hotfix
|
|
- CI quality jobs (`web`, `api`) must pass
|
|
- At least one approval
|
|
- Rebase/merge when up to date with target branch
|
|
- Delete branch after merge
|
|
|
|
## Versioning
|
|
|
|
- SemVer через [semantic-release](https://semantic-release.gitbook.io/) на push в `main`
|
|
- Не править версию вручную; тег `vX.Y.Z` ставит CI
|
|
- Подробнее: [`docs/releasing.md`](docs/releasing.md)
|
|
|
|
## Branch protection (Gitea)
|
|
|
|
Configure for **main** and **develop**:
|
|
|
|
- Require pull request reviews
|
|
- Require status checks (`CI` / quality jobs `web`, `api`)
|
|
- Require branches to be up to date
|
|
- No force push, no deletion
|
|
|
|
## Local development
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
pnpm install
|
|
pnpm --filter @cdnmanager/shared build
|
|
pnpm --filter @cdnmanager/db build
|
|
|
|
# API (:8080)
|
|
pnpm --filter @cdnmanager/api dev
|
|
|
|
# Frontend (:5173, proxies /api → :8080)
|
|
pnpm --filter web dev
|
|
```
|
|
|
|
## Release process
|
|
|
|
Релизы делает workflow **CD** на push в `main` (semantic-release + bake). Не создавать ветки `release/*` и не bump'ать файлы версии вручную. См. [`docs/releasing.md`](docs/releasing.md).
|