From 9f5c77fbadd517dd2b4e77fcd10eda83c5014c72 Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Tue, 12 Aug 2025 15:20:34 +0700 Subject: [PATCH] fix: align PR template with actual semantic-release and Docker workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PR template was outdated and misaligned with the actual workflow behavior introduced in PR #217. Key fixes: - **Semantic Release**: Now matches pyproject.toml configuration - feat → MINOR, fix/perf → PATCH (not refactor) - Added missing 'build' type from allowed_tags - Fixed breaking change syntax (feat\!, BREAKING CHANGE: in body) - Removed incorrect 'breaking:' prefix format - **Docker Builds**: Clarified independence from versioning - Builds trigger on file changes (Python, Docker files) - Manual triggering via 'docker-build' label - Removed misleading 'trigger Docker build + version bump' claims - **Conventional Commits**: Added link to official specification The template now accurately reflects the semantic-release config and docker-pr.yml workflow implementation, preventing contributor confusion. --- .github/pull_request_template.md | 43 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0b8a086..0e46604 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,28 +1,35 @@ ## PR Title Format -**Please ensure your PR title follows one of these formats:** +**Please ensure your PR title follows [Conventional Commits](https://www.conventionalcommits.org/) format:** -### Version Bumping Prefixes (trigger Docker build + version bump): -- `feat: ` - New features (triggers MINOR version bump) -- `fix: ` - Bug fixes (triggers PATCH version bump) -- `breaking: ` or `BREAKING CHANGE: ` - Breaking changes (triggers MAJOR version bump) -- `perf: ` - Performance improvements (triggers PATCH version bump) -- `refactor: ` - Code refactoring (triggers PATCH version bump) +### Version Bumping Types (trigger semantic release): +- `feat: ` - New features → **MINOR** version bump (1.1.0 → 1.2.0) +- `fix: ` - Bug fixes → **PATCH** version bump (1.1.0 → 1.1.1) +- `perf: ` - Performance improvements → **PATCH** version bump (1.1.0 → 1.1.1) -### Non-Version Prefixes (no version bump): -- `docs: ` - Documentation only +### Breaking Changes (trigger MAJOR version bump): +For breaking changes, use any commit type above with `BREAKING CHANGE:` in the commit body or `!` after the type: +- `feat!: ` → **MAJOR** version bump (1.1.0 → 2.0.0) +- `fix!: ` → **MAJOR** version bump (1.1.0 → 2.0.0) + +### Non-Versioning Types (no release): +- `build: ` - Build system changes - `chore: ` - Maintenance tasks -- `test: ` - Test additions/changes - `ci: ` - CI/CD changes -- `style: ` - Code style changes +- `docs: ` - Documentation only +- `refactor: ` - Code refactoring (no functional changes) +- `style: ` - Code style/formatting changes +- `test: ` - Test additions/changes -### Docker Build Options: -- `docker: ` - Force Docker build without version bump -- `docs+docker: ` - Documentation + Docker build -- `chore+docker: ` - Maintenance + Docker build -- `test+docker: ` - Tests + Docker build -- `ci+docker: ` - CI changes + Docker build -- `style+docker: ` - Style changes + Docker build +### Docker Build Triggering: + +Docker builds are **independent** of versioning and trigger based on: + +**Automatic**: When PRs modify relevant files: +- Python files (`*.py`), `requirements*.txt`, `pyproject.toml` +- Docker files (`Dockerfile`, `docker-compose.yml`, `.dockerignore`) + +**Manual**: Add the `docker-build` label to force builds for any PR. ## Description