Skip to content

Commit

Permalink
Don't set overall state of staging project to building if disabled repos
Browse files Browse the repository at this point in the history
are present

Keeping the overall state of a staging project in building
if there is a disabled repository, makes the staging workflow
unusable.

Related to #7359
  • Loading branch information
krauselukas committed Oct 1, 2019
1 parent d67c5a7 commit 642670e
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 981 deletions.
6 changes: 1 addition & 5 deletions src/api/app/models/concerns/staging_project.rb
Expand Up @@ -77,10 +77,6 @@ def requests_to_review
@requests_to_review ||= BsRequest.with_open_reviews_for(by_project: name)
end

def disabled_repositories
repositories.select { |repository| disabled_for?('build', repository.name, nil) }
end

def building_repositories
set_buildinfo unless @building_repositories
@building_repositories
Expand Down Expand Up @@ -175,7 +171,7 @@ def state

def build_or_check_state
# build_state
return :building if building_repositories.present? || disabled_repositories.present?
return :building if building_repositories.present?
return :failed if broken_packages.present?
# check_state
return :testing if missing_checks.present? || checks.pending.exists?
Expand Down

0 comments on commit 642670e

Please sign in to comment.