Astrodevil / resource-gallery

Resources related to software development
https://resource-gallery.pages.dev/
MIT License
28 stars 53 forks source link

Add Lint Commit Messages Workflow #267

Closed Nishitbaria closed 10 months ago

Nishitbaria commented 11 months ago

Issue Description:

Current State: Currently, our repository lacks a commit message linting workflow, which is crucial for maintaining a consistent and readable commit history. Clean and informative commit messages are essential for a well-maintained codebase, easier code reviews, and smoother collaboration among developers.

Desired Addition: We want to add a workflow named "Lint Commit Messages" to our GitHub repository. The purpose of this workflow is to automatically check commit messages for compliance with our commit message conventions.

Workflow Details:

Trigger Events: The workflow should be triggered on both pull requests and push events. This means the linting process will occur whenever code changes are proposed through pull requests or directly pushed to the repository.

Jobs: The "Lint Commit Messages" workflow will contain a single job named "commitlint," which will run on the ubuntu-latest runner.

Steps: The job will consist of the following steps:

  1. Checkout: The workflow will start by using the actions/checkout@v2 action to fetch the codebase from the repository. We should ensure that the fetch-depth is set to 0 to ensure all commit history is available for proper linting.

  2. Commit Message Linting: We will use the wagoid/commitlint-github-action@v4 action to perform the commit message linting. This action will analyze each commit message and check it against our defined commit message conventions.

Expected Behavior: Once this workflow is implemented, every time code is pushed to GitHub (either directly or through pull requests), the "Lint Commit Messages" workflow will automatically run, and commit messages will be validated. If any commit message does not adhere to the specified conventions, a failure status will be displayed for the commit, indicating that the commit message needs to be adjusted.

Benefits: By adding this workflow, we ensure that our commit messages are consistent, descriptive, and follow best practices. This consistency will enhance code review processes, improve team collaboration, and facilitate a more comprehensible commit history.

Additional Notes: If there are any specific commit message conventions we should adhere to, or if there are any additional steps or configurations required for the commit message linting process, please provide the details in the comments section below. Let's work together to enhance our development workflow and maintain a clean and meaningful commit history.

github-actions[bot] commented 11 months ago

Hey👋🏼, @Nishitbaria, thank you for opening an issue. You need to update or make PR in under 7 days

Soon the maintainers/owner will review it and provide you with feedback/suggestions.
If you think it's something urgent, feel free to reach out to Anand on Twitter.


Give us a ⭐ to show some support
Keep Contributing 🚀