Why didn't that work?

This commit is contained in:
Sebastian Cabrera 2023-08-28 19:10:48 -04:00
parent 368f06e584
commit 2661344d14

View file

@ -102,6 +102,8 @@ 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())
return
reactionCount++ reactionCount++
if reactionCount >= reactionCountGoal { if reactionCount >= reactionCountGoal {
@ -114,7 +116,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
if err != nil { if err != nil {
log.Println("Error merging pull request:", err) log.Println("Error merging pull request:", err)
} else { } else {
log.Println("Pull request", prNumber, "merged successfully") log.Println("Pull request #", prNumber, "merged successfully")
} }
return return