From f65ebf2fffb2d4bb29adbeba0c7e9692e00f4661 Mon Sep 17 00:00:00 2001 From: Arthur Shvarts Date: Thu, 14 Nov 2024 15:30:44 -0500 Subject: [PATCH] Trim '[bot]' suffix from botIdentity --- internal/pkg/githubapi/github_graphql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/githubapi/github_graphql.go b/internal/pkg/githubapi/github_graphql.go index cd1078f9..165f8da0 100644 --- a/internal/pkg/githubapi/github_graphql.go +++ b/internal/pkg/githubapi/github_graphql.go @@ -68,7 +68,7 @@ func MimizeStalePrComments(ghPrClientDetails GhPrClientDetails, githubGraphQlCli if err != nil { ghPrClientDetails.PrLogger.Errorf("Failed to minimize stale comments: err=%s\n", err) } - bi := githubv4.String(botIdentity) + bi := githubv4.String(strings.TrimSuffix(botIdentity, "[bot]")) for _, prComment := range getCommentNodeIdsQuery.Repository.PullRequest.Comments.Edges { if !prComment.Node.IsMinimized && prComment.Node.Author.Login == bi { if strings.Contains(string(prComment.Node.Body), "") {