Skip to content

Commit bcf0055

Browse files
committed
Fix nilpointer
1 parent 92efe34 commit bcf0055

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎internal/releases/github.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func UploadAssetsFileWithRetries(ctx context.Context, client Client, info Releas
8181
}
8282
return err, false
8383
})
84-
8584
}
8685

8786
// UsernameResolver is an interface that allows to resolve the username of a commit.
@@ -115,7 +114,7 @@ func (c *GitHubClient) ResolveUsername(ctx context.Context, sha, author string,
115114
return "", nil
116115
}
117116

118-
if r.Author.Login == nil {
117+
if r.Author == nil || r.Author.Login == nil {
119118
return "", nil
120119
}
121120

@@ -188,7 +187,6 @@ func (c *GitHubClient) UploadAssetsFile(ctx context.Context, info ReleaseInfo, f
188187
}
189188

190189
return TemporaryError{err}
191-
192190
}
193191

194192
type TemporaryError struct {

0 commit comments

Comments
 (0)