Skip to content

Commit 8c13c7c

Browse files
authored
ignore comments on github issues (#1704)
1 parent 1f192d5 commit 8c13c7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/controllers/github.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,12 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
699699
actor := *payload.Sender.Login
700700
commentBody := *payload.Comment.Body
701701
defaultBranch := *payload.Repo.DefaultBranch
702+
isPullRequest := payload.Issue.IsPullRequest()
703+
704+
if !isPullRequest {
705+
log.Printf("comment not on pullrequest, ignroning")
706+
return nil
707+
}
702708

703709
link, err := models.DB.GetGithubAppInstallationLink(installationId)
704710
if err != nil {

0 commit comments

Comments
 (0)