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++ reactionCount++
approvals[prNumber] = commentAuthor approvals[prNumber] = commentAuthor
} else { } else {
commentText := "@(#{commentAuthor}) your vote has already been counted :x:"
commentText = strings.Replace(commentText, "(#{commentAuthor})", commentAuthor, 1)
// Respond with a comment // Respond with a comment
comment := &github.IssueComment{ 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) _, _, err := client.Issues.CreateComment(ctx, owner, repo, prNumber, comment)
if err != nil { if err != nil {
log.Println("Error creating comment:", err) log.Println("Error creating comment:", err)
} }
return
} }
} }
} }
log.Println(approvals)
if reactionCount >= reactionCountGoal { if reactionCount >= reactionCountGoal {
// Merge the pull request // Merge the pull request
merge := &github.PullRequestOptions{ merge := &github.PullRequestOptions{