Skip to content

Commit 1422e4a

Browse files
authored
Merge pull request #15 from ravilushqa/fix_seg_fault
fix bug
2 parents 7c62c2c + 1a2e199 commit 1422e4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/description/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ func genCompletionPerFile(ctx context.Context, client *oAIClient.Client, diff *g
138138
OverallDescribeCompletion := fmt.Sprintf("Pull request title: %s, body: %s\n\n", pr.GetTitle(), pr.GetBody())
139139

140140
for i, file := range diff.Files {
141+
if file.Patch == nil {
142+
continue
143+
}
141144
prompt := fmt.Sprintf(oAIClient.PromptDescribeChanges, *file.Patch)
142145

143146
if len(prompt) > 4096 {

0 commit comments

Comments
 (0)