feat: add logs

This commit is contained in:
u80864958
2026-02-13 17:44:56 +01:00
parent 343f6ab165
commit b5912d0725
4 changed files with 51 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
package pierre
import (
"log/slog"
"context"
"fmt"
"io"
@@ -19,6 +21,7 @@ type Comment struct {
}
func (s *Service) judgePR(ctx context.Context, diff io.Reader) (comments []Comment, err error) {
slog.Info("judgePR started")
diffBytes, err := io.ReadAll(diff)
if err != nil {
return nil, fmt.Errorf("failed to read diff: %w", err)
@@ -81,6 +84,7 @@ If project guidelines are provided, treat them as hard rules that must be respec
for _, v := range unique {
comments = append(comments, v)
}
slog.Info("judgePR finished", "comments", len(comments))
return
}