diff --git a/pkg/github/actions.go b/pkg/github/actions.go index 0fa49bac7..8c7b08a85 100644 --- a/pkg/github/actions.go +++ b/pkg/github/actions.go @@ -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:] } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy