Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions next/controllers/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
if *event.Action == "deleted" {
err := handleInstallationDeletedEvent(event)
if err != nil {
c.String(http.StatusInternalServerError, "Failed to handle webhook event.")
log.Printf("Failed to handle webhook event. %v", err)
return
}
}

c.String(http.StatusAccepted, "ok")
return

case *github.IssueCommentEvent:
log.Printf("IssueCommentEvent, action: %v\n", *event.Action)
case *github.PullRequestEvent:
Expand All @@ -81,7 +84,7 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
if err != nil {
log.Printf("handlePullRequestEvent error: %v", err)
}
c.String(http.StatusAccepted, err.Error())
c.String(http.StatusAccepted, "ok")
return

case *github.PushEvent:
Expand All @@ -90,7 +93,7 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
if err != nil {
log.Printf("handlePushEvent error: %v", err)
}
c.String(http.StatusAccepted, err.Error())
c.String(http.StatusAccepted, "ok")
return

default:
Expand Down
Loading