Skip to content

Commit

Permalink
fix: Return error if Author not mapped πŸ›
Browse files Browse the repository at this point in the history
  • Loading branch information
guisea committed Jul 22, 2024
1 parent 4a98e54 commit f438959
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/provider/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ func (repo *GiteaRepository) GetCommits(_, toSha string) ([]*semrel.RawCommit, e
for _, commit := range commits {
sha := commit.SHA

if commit.Author == nil {
return nil, errors.New(fmt.Sprintf("gitea: author is not found. Check email [%s] is assigned to user.",

Check warning on line 129 in pkg/provider/gitea.go

View workflow job for this annotation

GitHub Actions / lint

errorf: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (revive)
commit.Committer.Email))
}
allCommits = append(allCommits, &semrel.RawCommit{
SHA: sha,
RawMessage: commit.RepoCommit.Message,
Expand Down

0 comments on commit f438959

Please sign in to comment.