Documentation
¶
Index ¶
- func FindGitDir() (string, error)
- func FindRepoRoot() (string, error)
- func GetEffectiveHooksDir() (string, error)
- func GetScriptPath() (string, error)
- func InstallHuskyPostCommitHook(huskyDir string) error
- func InstallHuskyPrepareCommitMsgHook(huskyDir string) error
- func InstallPostCommitHook(hooksDir string) error
- func InstallPrepareCommitMsgHook(hooksDir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindGitDir ¶
FindGitDir returns the path to the .git directory for the current repository. If not in a git repository, returns an error.
func FindRepoRoot ¶ added in v0.4.5
FindRepoRoot returns the absolute path to the repository root (work tree)
func GetEffectiveHooksDir ¶ added in v0.4.5
GetEffectiveHooksDir returns the directory where hooks should be installed. It respects `core.hooksPath` (e.g., Husky's .husky directory). When unset, it falls back to <gitDir>/hooks.
func GetScriptPath ¶
GetScriptPath returns the absolute path to the scripts directory
func InstallHuskyPostCommitHook ¶ added in v0.4.5
InstallHuskyPostCommitHook installs or augments a Husky post-commit hook without overwriting existing Husky logic.
func InstallHuskyPrepareCommitMsgHook ¶ added in v0.4.5
InstallHuskyPrepareCommitMsgHook installs or augments a Husky prepare-commit-msg hook without overwriting existing Husky logic. It appends a noidea block if not already present.
func InstallPostCommitHook ¶
InstallPostCommitHook installs the post-commit hook script in the specified hooks directory. The hook will call 'noidea moai' after each commit to show feedback about the commit message.
func InstallPrepareCommitMsgHook ¶
InstallPrepareCommitMsgHook installs the prepare-commit-msg hook for commit message suggestions. This hook runs before Git creates a commit and offers AI-generated commit message suggestions based on the staged changes.
Types ¶
This section is empty.