{"id":24907515,"url":"https://github.com/aliymn/conventional-commits-check","last_synced_at":"2025-10-16T18:31:06.423Z","repository":{"id":148315706,"uuid":"619305380","full_name":"AliYmn/conventional-commits-check","owner":"AliYmn","description":"Once added, the hook runs on every commit, checks messages against Conventional Commits rules, adds emojis, and blocks non-compliant commits.","archived":false,"fork":false,"pushed_at":"2024-11-18T11:49:21.000Z","size":818,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T07:36:11.744Z","etag":null,"topics":["commit","conventional-commits","pre-commit","pre-commit-hook","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliYmn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"AliYmn"}},"created_at":"2023-03-26T21:03:46.000Z","updated_at":"2024-11-18T19:40:50.000Z","dependencies_parsed_at":"2024-09-17T00:13:05.501Z","dependency_job_id":null,"html_url":"https://github.com/AliYmn/conventional-commits-check","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliYmn%2Fconventional-commits-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliYmn%2Fconventional-commits-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliYmn%2Fconventional-commits-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliYmn%2Fconventional-commits-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliYmn","download_url":"https://codeload.github.com/AliYmn/conventional-commits-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236738569,"owners_count":19196966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commit","conventional-commits","pre-commit","pre-commit-hook","python","python3"],"created_at":"2025-02-02T01:17:35.215Z","updated_at":"2025-10-16T18:31:06.062Z","avatar_url":"https://github.com/AliYmn.png","language":"Python","funding_links":["https://github.com/sponsors/AliYmn"],"categories":[],"sub_categories":[],"readme":"# 🎉 Conventional Commits Check\n\n![PyPI Version](https://img.shields.io/pypi/v/conventional-commits-check)\n![License](https://img.shields.io/github/license/AliYmn/conventional-commits-check)\n![Last Commit](https://img.shields.io/github/last-commit/AliYmn/conventional-commits-check)\n![Issues](https://img.shields.io/github/issues/AliYmn/conventional-commits-check)\n![Stars](https://img.shields.io/github/stars/AliYmn/conventional-commits-check?style=social)\n![Forks](https://img.shields.io/github/forks/AliYmn/conventional-commits-check?style=social)\n![Downloads](https://img.shields.io/pypi/dm/conventional-commits-check)\n![Contributors](https://img.shields.io/github/contributors/AliYmn/conventional-commits-check)\n\n![Result Image](https://raw.githubusercontent.com/AliYmn/conventional-commits-check/master/images/demo.png)\n\n`conventional-commits-check` is a powerful and easy-to-use Python pre-commit hook that helps enforce [Conventional Commits](https://www.conventionalcommits.org/) rules on your commit messages. It supports adding relevant emojis based on your commit types to enhance readability and bring some fun to your commit history! 🚀\n\n## 📜 What are Conventional Commits?\n\nConventional Commits provide a lightweight convention for creating a clear and explicit commit history. By using this hook, you'll ensure that your commit messages follow this convention, making your versioning easier to manage and your collaboration more seamless.\n\n## 💡 Features\n\n- ✅ Enforces Conventional Commits rules on your commit messages.\n- 🎨 Optionally adds context-specific emojis to the start of commit messages.\n- 🛑 Blocks commits that do not conform to the Conventional Commits standard.\n- 🔧 Allows for **custom commit types** and **custom emojis** via configuration.\n- 🔄 **Auto-Merge Commit Handling**: Automatically formats auto-merge commit messages to follow a consistent style.\n\n## 🔄 Auto-Merge Commit Handling\n\nThe `conventional-commits-check` tool includes functionality to handle auto-merge commit messages. When a commit message matches the pattern \"Merge branch '...' into '...'\", it is automatically reformatted to a more consistent style, such as \"merge: branch '...' into '...'\". If emojis are enabled, a 🎉 emoji is prepended to the message. This feature ensures that even auto-generated commit messages maintain a clean and readable format.\n\n## 🔧 Customization\n\nYou can customize the commit types and their associated emojis by modifying the `commit_types.py` and `commits_check_config.yaml` files. These files allow you to define additional commit types and specify emojis for each type.\n\n### Example : [`commit_types.py`](https://github.com/AliYmn/conventional-commits-check/blob/master/conventional_commits_check/commit_types.py)\n\n```python\ncommit_types = {\n    \"access\": {\n        \"description\": \"Improve accessibility.\",\n        \"emoji\": \"♿️\"\n    },\n    \"analytics\": {\n        \"description\": \"Add or update analytics or track code.\",\n        \"emoji\": \"📈\"\n    },\n    \"animation\": {\n        \"description\": \"Add or update animations and transitions.\",\n        \"emoji\": \"💫\"\n    },\n    \"arch\": {\n        \"description\": \"Make architectural changes.\",\n        \"emoji\": \"🏗️\"\n    },\n    \"assets\": {\n        \"description\": \"Add or update assets.\",\n        \"emoji\": \"🍱\"\n    },\n    \"beer\": {\n        \"description\": \"Write code drunkenly.\",\n        \"emoji\": \"🍻\"\n    },\n    # ... more commit types ...\n}\n```\n\n### Customizing Existing Emojis\n\nYou can also modify the emojis for existing commit types by updating the `commits_check_config.yaml`:\n\n```yaml\nadditional_commit_types:\n  feat:\n    description: Introduce new features.\n    emoji: 🎉\n  fix:\n    description: Fix a bug.\n    emoji: 🛠️\n```\n\n## ⚙️ Installation\n\nTo add `conventional-commits-check` to your project, follow these steps:\n\n1. **Update your `.pre-commit-config.yaml`:**\n\n   In your project’s root directory, add the following:\n\n   ```yaml\n   repos:\n     - repo: https://github.com/AliYmn/conventional-commits-check\n       rev: v2.9.0  # Use the latest release version\n       hooks:\n         - id: conventional-commits-check\n           stages: [commit-msg]\n           args: [\"--emoji-disabled\"]  # Use this argument to disable emojis\n   ```\n\n2. **Install the pre-commit hook:**\n\n   ```bash\n   pre-commit install --hook-type commit-msg -f\n   ```\n\n3. **Install the `conventional-commits-check` package:**\n\n   ```bash\n   pip install -U conventional-commits-check\n   ```\n\n4. **Optional:** Update the pre-commit package:\n\n   ```bash\n   pre-commit autoupdate\n   ```\n\n## 🚀 Usage\n\nOnce the hook is added, it will automatically run each time you make a commit. The hook checks your commit message against Conventional Commits rules, optionally adds the appropriate emoji, and prevents non-conforming commits.\n\n## 👨‍💻 Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests to enhance `conventional-commits-check`. Let’s make commits fun and consistent! 😄\n\n## 📜 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\nEnhance your workflow and bring some life to your commits with `conventional-commits-check`! 🎉✨🐛\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliymn%2Fconventional-commits-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliymn%2Fconventional-commits-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliymn%2Fconventional-commits-check/lists"}