Função auxiliar para obter blame de um arquivo
(filepath string)
| 121 | |
| 122 | // Função auxiliar para obter blame de um arquivo |
| 123 | func GetFileBlame(filepath string) (string, error) { |
| 124 | cmd := exec.Command("git", "blame", filepath) //#nosec G204 -- agent/CLI tool execution; commands validated by command_validator + policy_manager upstream |
| 125 | output, err := cmd.Output() |
| 126 | if err != nil { |
| 127 | return "", fmt.Errorf("erro ao obter blame do arquivo %s: %w", filepath, err) |
| 128 | } |
| 129 | return string(output), nil |
| 130 | } |