Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/github/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,10 +799,11 @@ func trimContent(content string, tailLines int) (string, int) {
lineCount := 0
if tailLines > 0 {

// Count backwards to find the nth newline from the end
// Count backwards to find the nth newline from the end and a total number of lines
for i := len(content) - 1; i >= 0 && lineCount < tailLines; i-- {
if content[i] == '\n' {
lineCount++
// If we have reached the tailLines, trim the content
if lineCount == tailLines {
content = content[i+1:]
}
Expand Down