Skip to content

Commit

Permalink
fix: return false if not found project
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Apr 19, 2024
1 parent feeaa9e commit 88eaa5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/hpr/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ def create_gitlab_repository(name, url)

def search_gitlab_repository(name)
projects = gitlab.project_search(name).select { |project| project.namespace.id == current_group.id }
return if projects.empty?

projects[0] unless projects.empty?
projects[0]
end

def determine_repository_path!
Expand Down

0 comments on commit 88eaa5e

Please sign in to comment.