Skip to content

Cocogitto as commit backend #2988

Description

@7r1n1t3

Describe the solution you'd like

It would be nice to commit using cocogitto from inside gitui so that working on repos following conventionalcommits 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 :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions