feat: add logs
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user