commit
67b36af5af
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
var version = "v0.05"
|
var version = "v0.06"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
initGitHubClient(version)
|
initGitHubClient(version)
|
||||||
|
|
|
@ -88,7 +88,7 @@ func webhookHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
log.Println("User type:", userType, "Comment body:", commentBody)
|
log.Println("User type:", userType, "Comment body:", commentBody)
|
||||||
|
|
||||||
if !strings.Contains(userType, "bot") && strings.Contains(commentBody, ":+1:") {
|
if !strings.Contains(userType, "bot") && strings.Contains(commentBody, "+1") {
|
||||||
log.Println("Received Issue Comment Event: processing now!")
|
log.Println("Received Issue Comment Event: processing now!")
|
||||||
processIssueCommentEvent(event)
|
processIssueCommentEvent(event)
|
||||||
break
|
break
|
||||||
|
@ -147,7 +147,7 @@ func processIssueCommentEvent(event *github.IssueCommentEvent) {
|
||||||
commentAuthor := comment.GetUser().GetLogin()
|
commentAuthor := comment.GetUser().GetLogin()
|
||||||
commentBody := comment.GetBody()
|
commentBody := comment.GetBody()
|
||||||
|
|
||||||
if !strings.Contains(userType, "bot") && strings.Contains(commentBody, ":+1:") {
|
if !strings.Contains(userType, "bot") && strings.Contains(commentBody, "+1") {
|
||||||
_, exists := approvals[commentAuthor]
|
_, exists := approvals[commentAuthor]
|
||||||
if !exists {
|
if !exists {
|
||||||
approvals[commentAuthor] = 1
|
approvals[commentAuthor] = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue