gitui-org / gitui-org/gitui

Cocogitto as commit backend

Aperta
#2,988 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature-request
Lingua principale
Rust
Stelle
22.5k
Fork
773
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

# 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 :)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non vengono indicati file, test o punti di ingresso. Inizia tracciando il flusso di commit esistente di gitui e analizzando i tipi, gli scope, i flag e la configurazione cog.toml supportati da Cocogitto. Il lavoro è completo quando il design è concordato e sono implementati l’opzione per il backend dei commit, i prompt conventional-commit e il normale valore predefinito di Git, con copertura per entrambi i backend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, rust
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.