Skip to content

Commit c9a37ad

Browse files
committed
fix(ghpr): Check for nil value
Signed-off-by: Cezar Craciunoiu <[email protected]>
1 parent 3d88055 commit c9a37ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/ghpr/ghpr_mergable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (pr *PullRequest) SatisfiesMergeRequirements(ctx context.Context, opts ...P
3838
}
3939

4040
pull, err := mopts.ghClient.GetPullRequest(ctx, pr.ghOrg, pr.ghRepo, pr.ghPrId)
41-
if err != nil {
41+
if err != nil || pull == nil {
4242
return false, nil, fmt.Errorf("could not get pull request: %w", err)
4343
}
4444

0 commit comments

Comments
 (0)