Merge pull request #32 from rowbawts/dev

Merging based on reactions
This commit is contained in:
openest-source-bot[bot] 2023-08-29 03:25:21 +00:00 committed by GitHub
commit e6aa6968ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
// Respond with a comment
comment := &github.IssueComment{
Body: github.String("Merging based on reactions :fireworks:"),
Body: github.String("Merging based on reactions :heavy_check_mark: :rocket:"),
}
_, _, err := client.Issues.CreateComment(ctx, owner, repo, prNumber, comment)
@ -153,9 +153,9 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
return
} else {
commentText := "Votes: (#{reactionCount}) Needed: (#{reactionRemainingCount})"
commentText := "Votes: (#{reactionCount})/(#{reactionCountGoal})"
commentText = strings.Replace(commentText, "(#{reactionCount})", strconv.Itoa(reactionCount), 1)
commentText = strings.Replace(commentText, "(#{reactionRemainingCount})", strconv.Itoa(reactionCountGoal-reactionCount), 1)
commentText = strings.Replace(commentText, "(#{reactionCountGoal})", strconv.Itoa(reactionCountGoal), 1)
// Respond with a comment
comment := &github.IssueComment{