avinashkranjan / Friday

🎓 Friday - Your Personal Class Manager Assistant, It'll never let you miss another assignment deadline or upcoming test. https://friday.avinashranjan.com
https://play.google.com/store/apps/details?id=com.avinashkranjan.friday
MIT License
108 stars 153 forks source link

Implement Commit lint for Commit Standards in Project Repository ⚡ #361

Closed Nishitbaria closed 1 year ago

Nishitbaria commented 1 year ago

Description:

As our development team embraces the Conventional Commit standard for version control, it has become essential to maintain consistency and enforce proper commit message formatting across the project repository. Commitlint, a popular tool, can help us achieve this goal by automatically validating commit messages against the Conventional Commit guidelines.

Objective:

The objective of this GitHub issue is to add Commitlint to our project repository, enabling automatic validation of commit messages, and ensuring that they conform to the Conventional Commit format.

Tasks:

  1. Install Commitlint and Husky: Integrate Commitlint into our project repository by installing the required dependencies, including Husky, which allows us to run pre-commit hooks.

  2. Configure Commitlint Rules: Define and configure the Commitlint rules to enforce Conventional Commit standards. This involves specifying the allowed types, scopes, and commit message formats.

  3. Implement Pre-Commit Hook: Set up a pre-commit hook using Husky to trigger Commitlint validation before each commit is made. This will prevent commits that do not comply with the Conventional Commit format.

  4. Customization Options: Consider providing developers with the flexibility to customize certain Commitlint rules to accommodate project-specific requirements, such as adjusting allowed types or scopes.

  5. Error Handling and Messaging: Implement clear and informative error messages to help developers understand why their commit messages were rejected and how to correct them.

  6. Integration with CI/CD Pipeline: If applicable, integrate Commitlint with our Continuous Integration and Continuous Deployment (CI/CD) pipeline to ensure that commits pushed to the main branch also adhere to Conventional Commit standards.

  7. Documentation and Guidelines: Update the project's documentation to include guidelines on writing commit messages following the Conventional Commit standard and how to leverage Commitlint for validation.

  8. Testing and Verification: Thoroughly test the implementation to ensure that Commitlint operates as expected, catching non-compliant commit messages and allowing valid ones.

Expected Benefits:

avinashkranjan commented 1 year ago

Go Ahead @Nishitbaria