git

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxDiffSize는 AI에게 전달할 최대 diff 크기 (약 10KB, ~2500 토큰)
	MaxDiffSize = 10000
)

Variables

This section is empty.

Functions

func CheckRepository

func CheckRepository() error

CheckRepository는 현재 디렉토리가 git 저장소인지 확인합니다

func Commit

func Commit(message string, opts CommitOptions) error

Commit은 주어진 메시지로 커밋을 생성합니다

func CommitWithFile added in v1.2.0

func CommitWithFile(messageFile string, opts CommitOptions) error

CommitWithFile은 파일에서 커밋 메시지를 읽어 커밋합니다 (멀티라인 메시지용)

func ExtractJiraIssue

func ExtractJiraIssue(branchName string) string

ExtractJiraIssue extracts JIRA issue key from branch name Pattern: PROJECT-123, ABC-456, DEVOPS2-430, etc.

func FormatCommitMessage

func FormatCommitMessage(message string) (string, error)

FormatCommitMessage automatically detects and adds JIRA issue key if present in branch name No configuration needed - works automatically based on branch name pattern

func GetCurrentBranch

func GetCurrentBranch() (string, error)

GetCurrentBranch returns the current git branch name

func GetLastCommitMessage

func GetLastCommitMessage() (string, error)

GetLastCommitMessage는 마지막 커밋 메시지를 반환합니다

func GetStagedDiff

func GetStagedDiff() (string, error)

GetStagedDiff는 staged 변경사항의 diff를 반환합니다

func GetStagedFiles

func GetStagedFiles() ([]string, error)

GetStagedFiles는 staged 파일 목록을 반환합니다

Types

type CommitOptions added in v1.2.0

type CommitOptions struct {
	NoVerify  bool
	GPGSign   bool // true면 -S 플래그 추가
	NoGPGSign bool // true면 --no-gpg-sign 플래그 추가
}

CommitOptions는 커밋 옵션을 담는 구조체입니다

Jump to

Keyboard shortcuts

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