Move required thumbs up for merge to 5

This commit is contained in:
Sebastian Cabrera 2023-08-28 19:21:16 -04:00
parent 6e15e53410
commit e76e22ca6b

View file

@ -90,7 +90,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
repo := event.GetRepo().GetName() repo := event.GetRepo().GetName()
prNumber := event.GetIssue().GetNumber() prNumber := event.GetIssue().GetNumber()
reactionCount := 0 reactionCount := 0
reactionCountGoal := 2 reactionCountGoal := 5
if event.GetIssue().IsPullRequest() { if event.GetIssue().IsPullRequest() {
comments, _, err := client.Issues.ListComments(ctx, owner, repo, prNumber, nil) 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 // Check if there are thumbs up (:+1:) reactions
for _, comment := range comments { for _, comment := range comments {
if strings.Contains(comment.GetBody(), "+1") && !strings.Contains(comment.GetUser().GetLogin(), "bot") { if strings.Contains(comment.GetBody(), "+1") && !strings.Contains(comment.GetUser().GetLogin(), "bot") {
fmt.Println(comment.GetUser().GetLogin())
reactionCount++ reactionCount++
} }
} }