Commit graph

3 commits

Author SHA1 Message Date
Julian Pawlowski
f60b5990ae test: add pytest framework and midnight-crossing tests
Set up pytest with Home Assistant support and created 6 tests for
midnight-crossing period logic (5 unit tests + 1 integration test).

Added pytest configuration, test dependencies, test runner script
(./scripts/test), and comprehensive tests for group_periods_by_day()
and midnight turnover consistency.

All tests pass in 0.12s.

Impact: Provides regression testing for midnight-crossing period bugs.
Tests validate periods remain visible across midnight turnover.
2025-11-21 23:47:01 +00:00
Julian Pawlowski
ddc718aabd feat(release): add semantic versioning workflow automation
Added intelligent version suggestion system based on Conventional Commits
analysis to support proper semantic versioning.

New scripts:
- check-if-released: Verify if commit exists in any version tag
  - Helps decide if legacy migration code is needed
  - Shows guidance for breaking changes vs simple migrations

- suggest-version: Analyze commits and suggest next version
  - Counts breaking changes, features, and bug fixes
  - Applies pre-1.0 rules: breaking→MINOR, feat→MINOR, fix→PATCH
  - Applies post-1.0 rules: breaking→MAJOR, feat→MINOR, fix→PATCH
  - Checks manifest.json and suggests alternatives (MAJOR/MINOR/PATCH)
  - Provides preview and release commands

Updated scripts:
- prepare-release: Now calls suggest-version when no argument provided
  - Shows suggested version before prompting
  - Maintains manual override capability

Impact: Developers get intelligent version suggestions based on actual
commit content, reducing versioning mistakes and following semver correctly.
2025-11-09 15:32:44 +00:00
Julian Pawlowski
e08fd60070 feat(release): add automated release notes generation system
Implemented multi-backend release notes generation:

**Scripts:**
- prepare-release: Bump manifest.json + create tag (foolproof workflow)
- generate-release-notes: Parse conventional commits with 3 backends
  * GitHub Copilot CLI (AI-powered, smart grouping)
  * git-cliff (template-based, fast and reliable)
  * Manual grep/awk (fallback, always works)
- setup: Auto-install git-cliff via cargo in DevContainer

**GitHub Actions:**
- auto-tag.yml: Automatically create tag on manifest.json version bump
- release.yml: Generate release notes and create GitHub release on tag push
- release.yml: Button config for GitHub UI release notes generator

**Configuration:**
- cliff.toml: Smart filtering rules
  * Excludes: manifest bumps, dev-env changes, CI/CD changes
  * Includes: Dependency updates (relevant for users)
  * Groups by conventional commit type with emoji

**Workflow:**
1. Run `./scripts/prepare-release 0.3.0`
2. Push commit + tag: `git push origin main v0.3.0`
3. CI/CD automatically generates release notes and creates GitHub release

Impact: Maintainers can prepare professional releases with one command.
Release notes are automatically generated from conventional commits with
intelligent filtering and categorization.
2025-11-09 14:25:15 +00:00