Helper functions for repository setup
(t *testing.T, repoDir, path, content string)
| 135 | |
| 136 | // Helper functions for repository setup |
| 137 | func writeFile(t *testing.T, repoDir, path, content string) { |
| 138 | fullPath := filepath.Join(repoDir, path) |
| 139 | dir := filepath.Dir(fullPath) |
| 140 | err := os.MkdirAll(dir, 0755) |
| 141 | require.NoError(t, err, "Failed to create dir") |
| 142 | err = os.WriteFile(fullPath, []byte(content), 0600) |
| 143 | require.NoError(t, err, "Failed to write file") |
| 144 | } |
| 145 | |
| 146 | func gitCommit(t *testing.T, repoDir, message string) { |
| 147 | ctx := context.Background() |
no outgoing calls