Skip to content

Commit f438959

Browse files
committed
fix: Return error if Author not mapped 🐛
1 parent 4a98e54 commit f438959

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/provider/gitea.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ func (repo *GiteaRepository) GetCommits(_, toSha string) ([]*semrel.RawCommit, e
125125
for _, commit := range commits {
126126
sha := commit.SHA
127127

128+
if commit.Author == nil {
129+
return nil, errors.New(fmt.Sprintf("gitea: author is not found. Check email [%s] is assigned to user.",
130+
commit.Committer.Email))
131+
}
128132
allCommits = append(allCommits, &semrel.RawCommit{
129133
SHA: sha,
130134
RawMessage: commit.RepoCommit.Message,

0 commit comments

Comments
 (0)