Skip to content

feat(linting): adding Commitlint ,Commitzen, Husky config#105

Merged
drtechie merged 1 commit into
PSMRI:developfrom
Zapper9982:feat/linting
Sep 30, 2025
Merged

feat(linting): adding Commitlint ,Commitzen, Husky config#105
drtechie merged 1 commit into
PSMRI:developfrom
Zapper9982:feat/linting

Conversation

@Zapper9982

@Zapper9982 Zapper9982 commented Sep 25, 2025

Copy link
Copy Markdown

Implemented it for ECD-API

📋 Description

JIRA ID: N/A

GitHub Issue: Fixes PSMRI/AMRIT#80

This PR introduces commit message standardization for the ⁠ Scheduler-API project by setting up *Commitlint, **Husky, and *Commitizen. The goal is to enforce a consistent commit message format across the repository to improve collaboration, readability, and enable automation (like changelogs and versioning) in the future.

These tools are now fully integrated:
•⁠ ⁠Commitlint enforces conventional commit message structure.
•⁠ ⁠Husky prevents non-compliant commits by using Git hooks.
•⁠ ⁠Commitizen provides an easy, interactive CLI for making properly formatted commits.
•⁠ ⁠GitHub Actions validate commit messages for all pull requests.

PS : @drtechie @Sneha6003 Implemented with the same standardization as for the UI repositories to ensure , clean code and well maintained code .

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

•⁠ ⁠Added ⁠ commitlint.config.js ⁠ with conventional commit rules.
•⁠ ⁠Configured Husky to run Commitlint on every commit via ⁠ .husky/commit-msg ⁠.
•⁠ ⁠Set up ⁠ Commitizen ⁠ with configuration in ⁠ package.json ⁠ for interactive commit prompts.
•⁠ ⁠Added GitHub Actions workflow ⁠ .github/workflows/commit-lint.yml ⁠ to check commit messages on PRs.
•⁠ ⁠Updated ⁠ package.json ⁠ and ⁠ package-lock.json ⁠ with required dev dependencies:

  • ⁠ @commitlint/cli ⁠
  • ⁠ @commitlint/config-conventional ⁠
  • ⁠ commitizen ⁠
  • ⁠ cz-conventional-changelog 

Testing & Validation

•⁠ ⁠Invalid commit messages are blocked locally with clear lint errors.
•⁠ ⁠Interactive commit flow works via ⁠ npm run commit ⁠ or ⁠ npx cz ⁠.
•⁠ ⁠GitHub Actions workflow correctly fails PRs with non-compliant commit messages.
•⁠ ⁠No disruption to existing build or CI pipelines.

Screenshots

Screenshot 2025-09-25 at 2 45 14 PM

@coderabbitai

coderabbitai Bot commented Sep 25, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sonarqubecloud

Copy link
Copy Markdown

@drtechie
drtechie merged commit 5534907 into PSMRI:develop Sep 30, 2025
2 checks passed
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