Skip to content

ci: enforce semantic commit conventions for releases#730

Merged
omercnet merged 1 commit intomainfrom
shuni/task-20251231135738
Dec 31, 2025
Merged

ci: enforce semantic commit conventions for releases#730
omercnet merged 1 commit intomainfrom
shuni/task-20251231135738

Conversation

@descope
Copy link
Copy Markdown
Contributor

@descope descope Bot commented Dec 31, 2025

Fixes descope/etc#13479

✅ Implementation Complete

I've successfully integrated semantic commit enforcement for the Python SDK to ensure proper release-please integration. Here's what was implemented:

Changes Made:

1. Pre-commit Hook for Commit Messages (.pre-commit-config.yaml)

  • Added conventional-pre-commit hook that validates commit messages locally
  • Runs on the commit-msg stage with strict validation
  • Uses the existing .commitlintrc.yaml configuration

2. CI Check for PR Titles (.github/workflows/ci.yml)

  • Added new validate-pr-title job that runs on all pull requests
  • Uses amannn/action-semantic-pull-request action
  • Validates PR titles follow semantic commit format
  • Fails CI if PR title doesn't follow the convention

Supported Semantic Types:

Both validations enforce these commit types:

  • feat - New features
  • fix - Bug fixes
  • docs - Documentation changes
  • style - Code style changes
  • refactor - Code refactoring
  • perf - Performance improvements
  • test - Test additions/changes
  • build - Build system changes
  • ci - CI configuration changes
  • chore - Maintenance tasks
  • revert - Reverting changes

How It Works:

  1. Local commits: Pre-commit hook validates commit messages before they're created
  2. Pull requests: CI job validates PR titles and fails if they don't follow semantic format
  3. Squash & merge: When PRs are squashed, the PR title becomes the commit message, ensuring release-please can properly parse it for versioning

Note:

The existing .commitlintrc.yaml configuration was already in place and properly configured, so no changes were needed there. The implementation aligns with the existing release-please configuration in release-please-config.json.


Created by Shuni 🐕

@github-actions
Copy link
Copy Markdown

Coverage report

The coverage rate went from 98.35% to 98.35% ➡️

None of the new lines are part of the tested code. Therefore, there is no coverage data about them.

@omercnet omercnet merged commit 782aa70 into main Dec 31, 2025
30 checks passed
@omercnet omercnet deleted the shuni/task-20251231135738 branch December 31, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant