{"id":25124453,"url":"https://github.com/nazdridoy/github-commit-labels","last_synced_at":"2026-05-09T00:31:53.341Z","repository":{"id":276238854,"uuid":"928672743","full_name":"nazdridoy/github-commit-labels","owner":"nazdridoy","description":"A userscript that enhances GitHub commits by adding beautiful labels for conventional commit types.","archived":false,"fork":false,"pushed_at":"2025-02-07T03:51:17.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T04:20:11.223Z","etag":null,"topics":["commit-message","commit-msg","github","userscript","userstyle"],"latest_commit_sha":null,"homepage":"https://greasyfork.org/en/scripts/526153-github-commit-labels","language":"JavaScript","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/nazdridoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-07T03:00:50.000Z","updated_at":"2025-02-07T03:48:48.000Z","dependencies_parsed_at":"2025-02-07T04:34:44.476Z","dependency_job_id":null,"html_url":"https://github.com/nazdridoy/github-commit-labels","commit_stats":null,"previous_names":["nazdridoy/github-commit-labels"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazdridoy%2Fgithub-commit-labels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazdridoy%2Fgithub-commit-labels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazdridoy%2Fgithub-commit-labels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazdridoy%2Fgithub-commit-labels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nazdridoy","download_url":"https://codeload.github.com/nazdridoy/github-commit-labels/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246863658,"owners_count":20846295,"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-message","commit-msg","github","userscript","userstyle"],"created_at":"2025-02-08T08:15:37.422Z","updated_at":"2026-05-09T00:31:53.314Z","avatar_url":"https://github.com/nazdridoy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Commit Labels\n\nA userscript that enhances GitHub commits by adding beautiful labels for conventional commit types. It automatically detects commit types (like feat, fix, docs) and adds visually appealing labels to make your commit history more readable.\n\n![commit-history](https://raw.githubusercontent.com/nazdridoy/github-commit-labels/main/previews/commit-history.png)\n\n[![Install GitHub Commit Labels](https://img.shields.io/badge/Install-GitHub%20Commit%20Labels-brightgreen?style=for-the-badge)](https://greasyfork.org/en/scripts/526153-github-commit-labels)\n\n## Features\n\n- 🏷️ Adds beautiful labels to conventional commit messages\n- 🎨 GitHub-style design that matches the platform\n- 🌓 Automatic theme detection (light, dark, and dark dimmed)\n- 💬 Informative tooltips showing detailed descriptions\n- 👆 Toggle button to quickly show/hide labels\n- 📤 Export/Import configurations for team sharing\n- ⚙️ Fully customizable through a user-friendly configuration panel\n- 🔄 Supports multiple aliases for each commit type\n- 🎯 Works on commit history and single commit pages\n- ⚠️ Special highlighting for BREAKING CHANGES (using `type!:` or `type(scope)!:`)\n\n## Try it on these repositories\n\nAfter installing the script, check it out on these repositories with conventional commits:\n\n- [Refined GitHub Sandbox - https://github.com/refined-github/sandbox/commits/conventional-commits/](https://github.com/refined-github/sandbox/commits/conventional-commits/)\n- [NGPT - https://github.com/nazdridoy/ngpt/commits/main/](https://github.com/nazdridoy/ngpt/commits/main/)\n- [Kokoro TTS - https://github.com/nazdridoy/kokoro-tts/commits/main](https://github.com/nazdridoy/kokoro-tts/commits/main)\n- [Standard Version - https://github.com/conventional-changelog/standard-version/commits](https://github.com/conventional-changelog/standard-version/commits)\n\n![preview1](https://raw.githubusercontent.com/nazdridoy/github-commit-labels/main/previews/preview1.png)\n\n## Supported Commit Types\n\nDefault commit types and their aliases:\n\n- **Feature**: `feat`, `feature`\n- **Added**: `added`, `add`\n- **Updated**: `update`, `updated`\n- **Removed**: `removed`, `remove`\n- **Fix**: `fix`, `bugfix`, `fixed`\n- **Hot Fix**: `hotfix`\n- **Documentation**: `docs`, `doc`, `documentation`\n- **Style**: `style`, `css`\n- **UI**: `ui`\n- **Refactor**: `refactor`\n- **Performance**: `perf`, `performance`\n- **Optimize**: `optimize`\n- **Test**: `test`, `tests`, `testing`\n- **Build**: `build`\n- **CI/CD**: `ci`, `cd`\n- **Deploy**: `deploy`, `release`\n- **Dependencies**: `deps`, `dep`, `dependencies`\n- **Chore**: `chore`\n- **Revert**: `revert`\n- **WIP**: `wip`\n- **Security**: `security`\n- **Internationalization**: `i18n`\n- **Accessibility**: `a11y`\n- **API**: `api`\n- **Database**: `data`\n- **Configuration**: `config`\n- **Initial Setup**: `init`\n- **You Can ADD More**\n  \n## Example Commit Formats\n\nHere are some examples of how to format your commits to get the labels:\n\n```\n# Basic format\nfeat: add new login functionality\nfix: resolve authentication bug\ndocs: update API documentation\n\n# With scope\nfeat(auth): implement OAuth2 login\nfix(api): handle rate limiting errors\nfeat!(auth): implement breaking change in auth\nrefactor!(parser): rewrite parser logic (breaking change)\ndocs(readme): add installation guide\nstyle(button): improve hover effects\nrefactor(service): clean up user service code\nperf(db): optimize database queries\ntest(auth): add unit tests for auth service\n```\n\nThe script will automatically detect the commit type from the first word of your commit message and add the appropriate label. Make sure to:\n1. Use one of the supported commit types or their aliases\n2. Follow the format: `type(scope): description` or `type: description`\n3. Indicate **breaking changes** by adding `!` after the type or scope: `type!:` or `type(scope)!:`.\n4. Keep the commit message clear and concise\n5. Use meaningful scopes that describe the area of the codebase being changed\n\n## Installation\n\n1. Install a userscript manager:\n   - [Tampermonkey](https://www.tampermonkey.net/) (Recommended)\n   - [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/)\n   - [Violentmonkey](https://violentmonkey.github.io/)\n\n2. Install the script:\n   - [Install from Greasy Fork](https://greasyfork.org/en/scripts/526153-github-commit-labels)\n   - Or create a new script in your userscript manager and copy the contents of [`github-commit-labels.js`](https://github.com/nazdridoy/github-commit-labels/blob/main/github-commit-labels.js)\n\n## Configuration\n\n1. Click on your userscript manager's icon\n2. Select \"GitHub Commit Labels\" \u003e \"Configure Commit Labels\"\n3. Customize:\n   - Add/remove commit types\n   - Edit aliases\n   - Change emojis\n   - Modify colors\n   - Toggle prefix removal\n   - Enable/disable tooltips\n   - Show/hide floating toggle button\n   - Export/Import your configuration\n  \n\n![preview2](https://raw.githubusercontent.com/nazdridoy/github-commit-labels/main/previews/preview2.png)\n\n## Integration with nGPT\n\n[nGPT](https://github.com/nazdridoy/ngpt) provides a powerful tool for automatically generating conventional commit messages that work seamlessly with GitHub Commit Labels.\n\n### Setup nGPT\n\n1. Install nGPT following the [installation instructions](https://nazdridoy.github.io/ngpt/installation/).\n2. Configure nGPT with your preferred LLM provider (OpenAI, Ollama, Groq, Claude, Gemini, etc.).\n\n### Generate Conventional Commit Messages\n\nUse nGPT to automatically generate well-formatted commit messages from your git diffs:\n\n```bash\n# Basic usage with staged changes\nngpt -g\n\n# With recursive chunking for large changes\nngpt -g --rec-chunk\n\n# Specify the commit type\nngpt -g --preprompt \"type:feat\"\n\n# Provide scope and context\nngpt -g --preprompt \"type:fix scope:authentication This fixes the broken login flow\"\n```\n\n#### Example nGPT Generated Output\n\nHere's an example of the commit message generated by nGPT:\n\n```\nfeat(auth): implement OAuth2 authentication flow\n\n- [feat] Create new AuthService class to handle token management\n- [feat] Implement login/logout functionality in UserController\n- [feat] Add configuration options for OAuth providers\n- [Update] Update user model to store OAuth tokens\n- [feat] Add unit tests for authentication flow\n```\n\nWhen this commit appears in GitHub, GitHub Commit Labels will automatically add a visually appealing \"Feature\" label next to the commit message.\n\n### Enforce Consistent Commit Messages\n\nAdd nGPT to your git workflow to ensure all commits follow the conventional format:\n\n#### Git Hook Integration\n\nCreate a git hook in `.git/hooks/prepare-commit-msg`:\n\n```bash\n#!/bin/bash\n# Skip if commit message is already provided\nif [ -z \"$(cat $1 | grep -v '^#')\" ]; then\n  # Generate commit message with nGPT and write to commit message file\n  ngpt -g --no-stream | tee $1\nfi\n```\n\nMake it executable:\n\n```bash\nchmod +x .git/hooks/prepare-commit-msg\n```\n\n#### Git Alias\n\nAdd a git alias in your `.gitconfig`:\n\n```\n[alias]\n  ai-commit = \"!ngpt -g | git commit -F -\"\n```\n\nThen use:\n\n```bash\ngit add .\ngit ai-commit\n```\n\n### Benefits of nGPT + GitHub Commit Labels\n\n1. **Consistent Formatting**: nGPT generates properly formatted conventional commit messages\n2. **Detailed Analysis**: Automatically analyzes code changes to create appropriate commit types and descriptions\n3. **Visual Enhancement**: Generated commits display beautifully with GitHub Commit Labels\n4. **Time Saving**: Eliminates the need to manually craft conventional commit messages\n5. **Better Repository History**: Improves repository maintainability with standardized, detailed commit history\n\nFor more details on nGPT's git commit message generation, visit the [nGPT Git Commit Message Generation Guide](https://nazdridoy.github.io/ngpt/usage/gitcommsg/).\n\n## Development\n\nTo contribute or modify the script:\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/nazdridoy/github-commit-labels.git\n```\n\n2. Make your changes to `github-commit-labels.js`\n\n3. Test the script by loading it in your userscript manager\n\n4. Submit a pull request with your changes\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details\n\n## Credits\n\nCreated by [nazdridoy](https://github.com/nazdridoy)\n\n## Support\n\nIf you encounter any issues or have suggestions:\n- [Open an issue](https://github.com/nazdridoy/github-commit-labels/issues)\n- [Submit a pull request](https://github.com/nazdridoy/github-commit-labels/pulls)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazdridoy%2Fgithub-commit-labels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnazdridoy%2Fgithub-commit-labels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazdridoy%2Fgithub-commit-labels/lists"}