Merge pull request #39 from rowbawts/dev

Remove logging approvals list
This commit is contained in:
Sebastian Cabrera 2023-08-29 09:38:09 -04:00 committed by GitHub
commit 40b89b4705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,21 +147,24 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
reactionCount++
approvals[prNumber] = commentAuthor
} else {
commentText := "@(#{commentAuthor}) your vote has already been counted :x:"
commentText = strings.Replace(commentText, "(#{commentAuthor})", commentAuthor, 1)
// Respond with a comment
comment := &github.IssueComment{
Body: github.String("Your vote has already been counted :x:"),
Body: github.String(commentText),
}
_, _, err := client.Issues.CreateComment(ctx, owner, repo, prNumber, comment)
if err != nil {
log.Println("Error creating comment:", err)
}
return
}
}
}
log.Println(approvals)
if reactionCount >= reactionCountGoal {
// Merge the pull request
merge := &github.PullRequestOptions{