From 1a6024c59581ffd860d0ccf748e1111edaaaac9a Mon Sep 17 00:00:00 2001 From: Marko Kosmerl Date: Fri, 10 Jan 2025 10:56:16 -0300 Subject: [PATCH] Update check_bot_approved_files.py (#98) Extending exception message. --- .../repo_policies/bot_checks/check_bot_approved_files.py | 2 +- reusable_workflows/tests/test_repo_policies.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reusable_workflows/repo_policies/bot_checks/check_bot_approved_files.py b/reusable_workflows/repo_policies/bot_checks/check_bot_approved_files.py index 3654513..dea3541 100644 --- a/reusable_workflows/repo_policies/bot_checks/check_bot_approved_files.py +++ b/reusable_workflows/repo_policies/bot_checks/check_bot_approved_files.py @@ -49,7 +49,7 @@ def get_approved_files_config(repo: github3.github.repo) -> str: return config_file except github3.exceptions.NotFoundError: raise Exception( - f"No config file found. Make sure you have a file saved at {BOT_APPROVED_FILES_PATH}" + f"No config file found. Make sure you have a file saved at {BOT_APPROVED_FILES_PATH} in the default branch" ) diff --git a/reusable_workflows/tests/test_repo_policies.py b/reusable_workflows/tests/test_repo_policies.py index ecd0661..201f64d 100644 --- a/reusable_workflows/tests/test_repo_policies.py +++ b/reusable_workflows/tests/test_repo_policies.py @@ -53,7 +53,7 @@ def test_get_approved_files_config_fails(download_gh_file): assert ( # fmt: off - str(exc.value) == f"No config file found. Make sure you have a file saved at {BOT_APPROVED_FILES_PATH}" + str(exc.value) == f"No config file found. Make sure you have a file saved at {BOT_APPROVED_FILES_PATH} in the default branch" )