From 9c1913a627af8b2f711b8f77d5f6d170d58dee49 Mon Sep 17 00:00:00 2001 From: JoannaaKL Date: Tue, 1 Jul 2025 09:49:52 +0200 Subject: [PATCH] Add comment to trim lines --- pkg/github/actions.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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