Skip to content

Commit

Permalink
Ensure repository host presence in ping URL methods
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Mar 3, 2025
1 parent 3ac2727 commit deb33de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,17 @@ def ping_urls
end

def repos_ping_url
return unless repository.present?
return unless repository.present? && repository['host'].present?
"https://repos.ecosyste.ms/api/v1/hosts/#{repository['host']['name']}/repositories/#{repository['full_name']}/ping"
end

def issues_ping_url
return unless repository.present?
return unless repository.present? && repository['host'].present?
"https://issues.ecosyste.ms/api/v1/hosts/#{repository['host']['name']}/repositories/#{repository['full_name']}/ping"
end

def commits_ping_url
return unless repository.present?
return unless repository.present? && repository['host'].present?
"https://commits.ecosyste.ms/api/v1/hosts/#{repository['host']['name']}/repositories/#{repository['full_name']}/ping"
end

Expand Down

0 comments on commit deb33de

Please sign in to comment.