Documentation
¶
Index ¶
- type ApplyResult
- type CommitMessageResult
- type Config
- type DiffResult
- type Service
- func (s *Service) ApplyPatch(ctx context.Context, patch string) (ApplyResult, error)
- func (s *Service) CommitMessage(ctx context.Context) (CommitMessageResult, error)
- func (s *Service) Diff(ctx context.Context, path string, staged bool) (DiffResult, error)
- func (s *Service) Status(ctx context.Context) ([]StatusEntry, error)
- type StatusEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyResult ¶
type CommitMessageResult ¶
type DiffResult ¶
type DiffResult struct {
Diff string `json:"diff"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ApplyPatch ¶
ApplyPatch applies a unified diff patch to the repository via `git apply`. Errors from git apply (e.g. conflicts) are returned as ApplyResult{OK:false} rather than a Go error so callers can inspect the message.
func (*Service) CommitMessage ¶
func (s *Service) CommitMessage(ctx context.Context) (CommitMessageResult, error)
CommitMessage inspects the staged diff and returns a conventional-commit suggestion together with the affected file list and diff stats.
type StatusEntry ¶
Click to show internal directories.
Click to hide internal directories.