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