Skip to content

Commit

Permalink
Assume project is public if no token was used to get it
Browse files Browse the repository at this point in the history
Signed-off-by: Sune Keller <absukl@almbrand.dk>
  • Loading branch information
sirlatrom committed Mar 15, 2021
1 parent 13bab83 commit 401d9b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/providers/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (g *gitLab) Fetch() (*File, error) {
return nil, err
}
projectUploadsURL := fmt.Sprintf("%s/uploads/", project.WebURL)
projectIsPublic := project.Visibility == gitlab.PublicVisibility
projectIsPublic := g.token == "" || project.Visibility == gitlab.PublicVisibility
log.Debugf("Project is public: %v", projectIsPublic)
for _, link := range release.Assets.Links {
if projectIsPublic || !strings.HasPrefix(link.URL, projectUploadsURL) {
Expand Down

0 comments on commit 401d9b9

Please sign in to comment.