From 3c7cfee442658deb5f7e0443f96286c256c22344 Mon Sep 17 00:00:00 2001 From: Carly Gundy <47304080+cgundy@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:17:01 +0100 Subject: [PATCH] chore(IDX): remove debug (#86) --- .../bot_checks/check_bot_approved_files.py | 5 ----- reusable_workflows/tests/test_repo_policies.py | 13 ++++++------- 2 files changed, 6 insertions(+), 12 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 253b7ba..4888cc1 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 @@ -25,11 +25,6 @@ def get_changed_files( Compares the files changed in the current branch to the merge base. """ commit_range = f"{merge_base_sha}..{branch_head_sha}" - # debug - current_branch = subprocess.run( - ["git", "branch"], capture_output=True, text=True, cwd=repo_path - ) - print(f"current branch: {current_branch.stdout}") result = subprocess.run( ["git", "diff", "--name-only", commit_range], capture_output=True, diff --git a/reusable_workflows/tests/test_repo_policies.py b/reusable_workflows/tests/test_repo_policies.py index ef678b9..3b607be 100644 --- a/reusable_workflows/tests/test_repo_policies.py +++ b/reusable_workflows/tests/test_repo_policies.py @@ -22,13 +22,12 @@ def test_get_changed_files(mock_subprocess_run): changed_files = get_changed_files("merge_base_sha", "branch_head_sha") assert changed_files == ["file1.py", "file2.py"] - # temporarily disable while debugging - # mock_subprocess_run.assert_called_once_with( - # ["git", "diff", "--name-only", "merge_base_sha..branch_head_sha"], - # capture_output=True, - # text=True, - # cwd=None, - # ) + mock_subprocess_run.assert_called_once_with( + ["git", "diff", "--name-only", "merge_base_sha..branch_head_sha"], + capture_output=True, + text=True, + cwd=None, + ) @mock.patch("repo_policies.bot_checks.check_bot_approved_files.download_gh_file")