feat(git): Implementar suporte e instalacao de Git Pre-commit Hooks - #27
Merged
Conversation
- Adiciona pacote internal/hook com Manager e Runner - Implementa subcomandos envguard hook (install, run, uninstall) - Adiciona GetStagedFiles e GetHooksDir ao pacote internal/git - Adiciona arquivo de configuracao .pre-commit-hooks.yaml - Registra ADR 0004 e atualiza termos no CONTEXT.md - Adiciona testes unitarios e de integracao completos Closes#18
…racao - Adiciona filepath.EvalSymlinks em setupTestGitRepo nos testes - Corrige comparacoes de caminhos no macOS e Windows runners
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descricao
Implementa o gerenciamento nativo de hooks pre-commit do Git no CLI do envguard (
envguard hook install,envguard hook run,envguard hook uninstall) e adiciona a configuracao oficial para o framework Python pre-commit via.pre-commit-hooks.yaml.Esta funcionalidade previne vazamentos de segredos diretamente no ciclo de commit local com latencia minima, inspecionando exclusivamente arquivos que estao em stage no Git.
Closes#18
Tipo de Alteracao
Alteracoes Realizadas
internal/hookcom os componentes:Manager: gerenciamento do script.git/hooks/pre-commitcom verificacao de assinatura (# Installed by envguard), suporte a flag--forcepara sobrescrita e desinstalacao segura.Runner: execucao otimizada de checagem pre-commit que avalia exclusivamente arquivos em stage contra regras do detector e allowlist.internal/gitcom os metodosGetStagedFileseGetHooksDir.envguard hookcom subcomandosinstall,run,uninstallehelp, alem de flags--path,--force,--confige--no-color..pre-commit-hooks.yamlna raiz do repositorio.docs/adr/0004-git-pre-commit-hooks.md) e atualizacao doCONTEXT.mdcom os termosHook ManagereHook Runner.Como Testar
Checklist do Contribuinte
Breaking Changes / Observacoes
scan,check,fix,init).