From 8ded097ed6cfe037d12c8223d748ec70004e73f4 Mon Sep 17 00:00:00 2001 From: Arthur Shvarts Date: Fri, 15 Nov 2024 08:40:13 -0500 Subject: [PATCH] Trim '[bot]' suffix from botIdentity (#41) --- 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 cd1078f..165f8da 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), "") {