Skip to content

Commit e742c19

Browse files
committed
fix: resp nil check in error handling in RemoveSubIssue function
1 parent 96e2c8f commit e742c19

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/github/issues.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,13 @@ func RemoveSubIssue(getClient GetClientFn, t translations.TranslationHelperFunc)
407407
httpClient := client.Client() // Use authenticated GitHub client
408408
resp, err := httpClient.Do(req)
409409
if err != nil {
410+
var ghResp *github.Response
411+
if resp != nil {
412+
ghResp = &github.Response{Response: resp}
413+
}
410414
return ghErrors.NewGitHubAPIErrorResponse(ctx,
411415
"failed to remove sub-issue",
412-
&github.Response{Response: resp},
416+
ghResp,
413417
err,
414418
), nil
415419
}

0 commit comments

Comments
 (0)