Skip to content

MPT-17672: add pre-commit hook#38

Merged
d3rky merged 1 commit intomainfrom
MPT-17672-add-pre-commit-hook
Feb 11, 2026
Merged

MPT-17672: add pre-commit hook#38
d3rky merged 1 commit intomainfrom
MPT-17672-add-pre-commit-hook

Conversation

@svazquezco
Copy link
Collaborator

@svazquezco svazquezco commented Feb 11, 2026

Closes MPT-17672

  • Add .pre-commit-hooks.yaml configuration file with a check-migrations hook that validates migration files for duplicate migration IDs
  • Update README.md with Pre-commit section containing setup instructions and example configuration for using the migration check hook

@svazquezco svazquezco requested a review from a team as a code owner February 11, 2026 17:09
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Adds pre-commit hook configuration and documentation for running migration checks. Introduces .pre-commit-hooks.yaml with a migration validation hook and updates README with setup instructions.

Changes

Cohort / File(s) Summary
Pre-commit Hook Setup
.pre-commit-hooks.yaml, README.md
Added new pre-commit hook configuration file defining a "Check migrations" hook that runs mpt-service-cli migrate --check on Python migration files. Updated README with Pre-commit section containing setup instructions and YAML configuration snippet for integrating the migration check hook.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed Found Jira issue key in the title: MPT-17672. The PR title correctly includes exactly one Jira issue key in the required format MPT-XXXX.
Test Coverage Required ✅ Passed PR modifies only configuration and documentation files (.pre-commit-hooks.yaml, README.md), not source code files requiring test coverage.
Single Commit Required ✅ Passed The PR contains exactly one commit, which maintains a clean git history.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
README.md (1)

63-74: Documentation looks good, minor suggestion for completeness.

The pre-commit configuration example is clear and correctly references the check-migrations hook. Consider adding a brief note explaining that the hook validates migration files for duplicate migration_id values, so users understand what the hook does before adding it to their config.


Comment @coderabbitai help to get the list of available commands and usage tips.

@svazquezco svazquezco force-pushed the MPT-17672-add-pre-commit-hook branch from 4ffef73 to 2875dd5 Compare February 11, 2026 17:09
@sonarqubecloud
Copy link

@d3rky d3rky merged commit 5dea70b into main Feb 11, 2026
4 checks passed
@d3rky d3rky deleted the MPT-17672-add-pre-commit-hook branch February 11, 2026 17:35
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.

2 participants