Ok we were counting the thumbs up from the bot which is definitely NOT what we want
This commit is contained in:
parent
8d9909e5ef
commit
368f06e584
1 changed files with 2 additions and 4 deletions
|
@ -51,7 +51,7 @@ func webhookHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
processIssuesEvent(event)
|
processIssuesEvent(event)
|
||||||
break
|
break
|
||||||
case *github.IssueCommentEvent:
|
case *github.IssueCommentEvent:
|
||||||
if event.GetComment().GetUser().GetLogin() != "openest-source-bot[bot]" {
|
if !strings.Contains(event.GetComment().GetUser().GetLogin(), "bot") {
|
||||||
processIssueCommentEvent(event)
|
processIssueCommentEvent(event)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -101,11 +101,9 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
|
||||||
|
|
||||||
// Check if there are thumbs up (:+1:) reactions
|
// Check if there are thumbs up (:+1:) reactions
|
||||||
for _, comment := range comments {
|
for _, comment := range comments {
|
||||||
if strings.Contains(comment.GetBody(), "+1") {
|
if strings.Contains(comment.GetBody(), "+1") && !strings.Contains(comment.GetUser().GetLogin(), "bot") {
|
||||||
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{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue