Cocogitto as commit backend
- Dominant language
- Rust
- Stars
- 22.5k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
# Describe the solution you'd like
It would be nice to commit using [cocogitto](https://github.com/cocogitto/cocogitto) from inside gitui so that working on repos following [conventionalcommits](conventionalcommits.org) would be:
1. typo-free: by checking whether the commit name follows the convention.
2. less typing: choosing the type and scope of a commit from menus.
# Possible implementation
An option asking for the **commit backend**: whether to use _git commit_ or _cog commit_ (with normal git as default _and maybe if the repository has a cog.toml, cog as default?_)
when the option is enabled, show a prompt menu during commit.
Prompt can look something like this:
| Prompt | Description |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| **type** | (_scrollable?_) menu of all types of commits that cocogitto recognizes¹ under this repository. |
| **body+footer** | the normal gitui commit message prompt |
| **optional scope** | menu of all scopes cocogitto recognizes¹ |
| **optional flags** | list of bool flags shown as buttons. For example: _breacking change?_ |
¹: I mean which are either in the default list of cocogitto or declared inside cog.toml. Maybe cocogitto exposes enabled options?
# Additional context
- I want to know your opinions: what could be improved? What is missing?
- I'm no rust wizard but I could give it a go and try implementing this :)
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing gitui's existing commit flow and reviewing Cocogitto's supported types, scopes, flags, and cog.toml configuration. Done means the design is agreed and the commit backend option, conventional-commit prompts, and normal Git default are implemented with coverage for both backends.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100