Skip to content

Commit

Permalink
Reorder config priority implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Sep 3, 2019
1 parent 05dfa5e commit fae5c21
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions baldrick/github/github_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ def get_repo_config(self, branch='master', path_to_file='pyproject.toml'):
logger.debug(f"Didn't find a fallback config in {self.repo} on branch {branch}.")

# Priority is 1) repo_config 2) fallback_config 3) app_config
logger.debug(f"{app_config}, {fallback_config}")
app_config.update_from_config(fallback_config)
repo_config.update_from_config(app_config)
logger.debug(f"{app_config}, {repo_config}")
app_config.update_from_config(repo_config)

logger.debug(f"Got this combined config {repo_config}")
logger.debug(f"Got this combined config {app_config}")

return repo_config
return app_config

def get_config_value(self, cfg_key, cfg_default=None, branch=None):
"""
Expand Down

0 comments on commit fae5c21

Please sign in to comment.