fix: log warnings instead of swallowing errors
CI / test (pull_request) Successful in 13s
CI / review (gpt-5, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 1m29s
CI / review (gpt-5-mini, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m44s

- GetAllFilesInPath: log.Printf when file fetch or dir recursion fails
- integration_test: use strings.SplitN for owner/repo parsing (idiomatic)

Addresses GPT review findings #1, #2.
This commit is contained in:
Rodin
2026-05-01 12:45:52 -07:00
parent 27e0056f29
commit ecebd52371
2 changed files with 8 additions and 8 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"strings"
)
@@ -224,7 +225,8 @@ func (c *Client) GetAllFilesInPath(ctx context.Context, owner, repo, path string
case "file":
content, err := c.GetFileContent(ctx, owner, repo, entry.Path)
if err != nil {
continue // Skip files we can't read
log.Printf("Warning: could not fetch file %s: %v", entry.Path, err)
continue
}
results[entry.Path] = content
case "dir":