Skip to content

Commit

Permalink
Add Undetermined Fallback State
Browse files Browse the repository at this point in the history
This commit adds a fallback state for process_repository
  • Loading branch information
suggoitanoshi committed Nov 25, 2018
1 parent 7305d9d commit 016ebd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions org_status/org_hosts/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def process_repository(self, repo, branch='master'):
# return the error result out of the 2 results
elif Status.ERROR in repo_status:
repo_status = Status.ERROR
else:
repo_status = Status.UNDETERMINED
else:
repo_status = repo_status[0]

Expand Down
2 changes: 2 additions & 0 deletions org_status/org_hosts/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def process_repository(self, repo, branch='master'):
# return the error result out of the 2 results
elif Status.ERROR in repo_status:
repo_status = Status.ERROR
else:
repo_status = Status.UNDETERMINED
else:
repo_status = repo_status[0]
return RepoStatus(repo.web_url, repo_status)
Expand Down

0 comments on commit 016ebd9

Please sign in to comment.