From fae5c213f766ffede375869de7e506ac9a88d3fe Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 3 Sep 2019 18:11:35 +0100 Subject: [PATCH] Reorder config priority implementation --- baldrick/github/github_api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/baldrick/github/github_api.py b/baldrick/github/github_api.py index be8ad0f..b6443d2 100644 --- a/baldrick/github/github_api.py +++ b/baldrick/github/github_api.py @@ -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): """