Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
Fixes GitLab RepoHasPath error handling (#423)
Browse files Browse the repository at this point in the history
In trhe case that gitlab is unreachable previous code would return no error , thus filtering out the app from the desired apps.
This is not a wanted behaviour as the check could not be performed correctly
  • Loading branch information
benoitg31 authored Dec 1, 2021
1 parent c574f5e commit ce12bd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/services/scm_provider/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ func (g *GitlabProvider) RepoHasPath(_ context.Context, repo *Repository, path s
Path: &path,
Ref: &repo.Branch,
})
if resp.TotalItems == 0 {
return false, nil
}
if err != nil {
return false, err
}
if resp.TotalItems == 0 {
return false, nil
}
return true, nil
}

Expand Down

0 comments on commit ce12bd5

Please sign in to comment.