Skip to content

Commit

Permalink
Add sensible error message for project with no releases
Browse files Browse the repository at this point in the history
  • Loading branch information
matsest committed Dec 25, 2019
1 parent ac47417 commit 5761c67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions release/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func (c *GitLabClient) ProjectGetLatestRelease(ctx context.Context, owner, proje
if err != nil {
return nil, nil, err
}
if len(releases) == 0 {
return nil, nil, fmt.Errorf("no releases found for project")
}
latest := releases[0]
return latest, response, err
}
Expand Down

0 comments on commit 5761c67

Please sign in to comment.