Skip to content

Commit e6ef962

Browse files
committed
refactor: fix sliding
1 parent 8a5efb9 commit e6ef962

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/github/actions.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,6 @@ func downloadLogContent(logURL string, tailLines int) (string, int, *http.Respon
754754
return "", 0, httpResp, fmt.Errorf("failed to download logs: HTTP %d", httpResp.StatusCode)
755755
}
756756

757-
// content, err := io.ReadAll(httpResp.Body)
758-
// if err != nil {
759-
// return "", 0, httpResp, fmt.Errorf("failed to read log content: %w", err)
760-
// }
761-
762757
if tailLines <= 0 {
763758
tailLines = 1000
764759
}
@@ -774,7 +769,7 @@ func downloadLogContent(logURL string, tailLines int) (string, int, *http.Respon
774769
lines = append(lines, line)
775770

776771
if len(lines) > tailLines {
777-
lines = lines[len(lines)-tailLines:]
772+
lines = lines[1:]
778773
}
779774
}
780775

0 commit comments

Comments
 (0)