Skip to content

Commit

Permalink
Remove duplicated function in StagingProject
Browse files Browse the repository at this point in the history
This moved to Project class, but was left unnoticed
as codeclimate didn't report on staging-workflow branch
  • Loading branch information
coolo committed Dec 12, 2018
1 parent c852d9e commit 767fcd7
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/api/app/models/staging/staging_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,6 @@ def build_state
:acceptable
end

def status_reports(checkables)
status_reports = Status::Report.where(checkable: checkables)
result = {}
status_reports.where(uuid: checkables.map(&:build_id)).find_each do |report|
result[report.checkable] = report
end

checkables.each do |checkable|
result[checkable] ||= Status::Report.new(checkable: checkable)
end

result.values
end

def check_state
return :testing if missing_checks.present? || checks.pending.exists?
return :failed if checks.failed.exists?
Expand Down

0 comments on commit 767fcd7

Please sign in to comment.