diff --git a/bot/go.mod b/bot/go.mod index 7f74909..820d987 100644 --- a/bot/go.mod +++ b/bot/go.mod @@ -1,6 +1,6 @@ module bot -go 1.21 +go 1.20 require ( github.com/bradleyfalzon/ghinstallation/v2 v2.6.0 diff --git a/bot/utils.go b/bot/utils.go index 06a52a5..e01aff8 100644 --- a/bot/utils.go +++ b/bot/utils.go @@ -90,7 +90,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) { repo := event.GetRepo().GetName() prNumber := event.GetIssue().GetNumber() reactionCount := 0 - reactionCountGoal := 2 + reactionCountGoal := 5 if event.GetIssue().IsPullRequest() { comments, _, err := client.Issues.ListComments(ctx, owner, repo, prNumber, nil) @@ -102,7 +102,6 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) { // Check if there are thumbs up (:+1:) reactions for _, comment := range comments { if strings.Contains(comment.GetBody(), "+1") && !strings.Contains(comment.GetUser().GetLogin(), "bot") { - fmt.Println(comment.GetUser().GetLogin()) reactionCount++ } } @@ -132,7 +131,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) { return } else { - commentText := "Current :+1: count is (#{reactionCount}) need (#{reactionRemainingCount}) more to merge" + commentText := "Votes: (#{reactionCount})/(#{reactionRemainingCount})" commentText = strings.Replace(commentText, "(#{reactionCount})", strconv.Itoa(reactionCount), 1) commentText = strings.Replace(commentText, "(#{reactionRemainingCount})", strconv.Itoa(reactionCountGoal-reactionCount), 1)