From 13002244d98eccaa69479a7bab2d998f75e6b40e Mon Sep 17 00:00:00 2001 From: Owen Rumney Date: Fri, 21 Jan 2022 08:45:00 +0000 Subject: [PATCH] return error if no patch details --- commenter/commenter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commenter/commenter.go b/commenter/commenter.go index bbd90de..63779f9 100644 --- a/commenter/commenter.go +++ b/commenter/commenter.go @@ -195,7 +195,7 @@ func buildComment(file, comment string, line int, info commitFileInfo) *github.P func getCommitInfo(file *github.CommitFile) (*commitFileInfo, error) { patch := file.GetPatch() if patch == "" { - return nil, nil + return nil, fmt.Errorf("ignoring [%s] because it has no patch informations, probably a binary?", *file.Filename) } groups := patchRegex.FindAllStringSubmatch(file.GetPatch(), -1)