Merge pull request #21 from rowbawts/test

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

View file

@ -102,6 +102,8 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
// Check if there are thumbs up (:+1:) reactions
for _, comment := range comments {
if strings.Contains(comment.GetBody(), "+1") && !strings.Contains(comment.GetUser().GetLogin(), "bot") {
fmt.Println(comment.GetUser().GetLogin())
return
reactionCount++
if reactionCount >= reactionCountGoal {
@ -114,7 +116,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
if err != nil {
log.Println("Error merging pull request:", err)
} else {
log.Println("Pull request", prNumber, "merged successfully")
log.Println("Pull request #", prNumber, "merged successfully")
}
return