Merge pull request #19 from rowbawts/test

Merging based on reactions
This commit is contained in:
openest-source-bot[bot] 2023-08-28 23:02:52 +00:00 committed by GitHub
commit a665c68bec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,8 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
if strings.Contains(comment.GetBody(), "+1") { if strings.Contains(comment.GetBody(), "+1") {
reactionCount++ reactionCount++
fmt.Println(comment.GetBody())
if reactionCount >= reactionCountGoal { if reactionCount >= reactionCountGoal {
// Merge the pull request // Merge the pull request
merge := &github.PullRequestOptions{ merge := &github.PullRequestOptions{
@ -114,7 +116,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
if err != nil { if err != nil {
log.Println("Error merging pull request:", err) log.Println("Error merging pull request:", err)
} else { } else {
log.Println("Pull request merged successfully") log.Println("Pull request", prNumber, "merged successfully")
} }
return return