Skip to content

Commit

Permalink
Update private repo methods
Browse files Browse the repository at this point in the history
Use the "newer" style of declaring private and make update_repo_info public
  • Loading branch information
schneems committed Oct 28, 2023
1 parent e540621 commit 8190cb0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/models/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,31 +223,29 @@ def self.find_by_full_name(full_name)
Repo.find_by!(full_name: full_name)
end

private

def update_repo_info!
UpdateRepoInfoJob.perform_later(self)
end

def downcase_name
private def downcase_name
self.name.downcase!
self.user_name.downcase!
end

def set_full_name!
private def set_full_name!
if self.full_name && user_name.blank?
self.user_name, self.name = self.full_name.split("/")
else
self.full_name = "#{user_name}/#{name}"
end
end

def strip_whitespaces
private def strip_whitespaces
self.name.strip!
self.user_name.strip!
end

def github_url_exists
private def github_url_exists
if issues_fetcher.error?
errors.add(
:expiration_date,
Expand Down

0 comments on commit 8190cb0

Please sign in to comment.