commit
40b89b4705
1 changed files with 6 additions and 3 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue