app

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config *config.Config
	Repo   *git.Repository
	GitCmd string
}

App holds configuration, repository and the git executable path.

func New

func New() (*App, error)

New creates a new App instance by locating the git executable, loading configuration, and opening the git repository (if any).

func (*App) ExecGit

func (a *App) ExecGit(args ...string) error

ExecGit delegates execution to the system's git executable.

func (*App) GenerateCommitMessage

func (a *App) GenerateCommitMessage() (string, error)

GenerateCommitMessage creates a commit message based on the diff and staged file names by calling an AI service.

func (*App) GetDiff

func (a *App) GetDiff() (string, error)

GetDiff collects the diff for staged changes using the system git.

func (*App) GetStagedFiles

func (a *App) GetStagedFiles() (string, error)

GetStagedFiles retrieves a list of staged file names.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL