Skip to content

Commit 1a2e199

Browse files
committed
fix bug
1 parent e441e97 commit 1a2e199

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)