Skip to content

Commit

Permalink
chore(IDX): remove debug (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundy authored Dec 9, 2024
1 parent dd27317 commit 3c7cfee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 6 additions & 7 deletions reusable_workflows/tests/test_repo_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 3c7cfee

Please sign in to comment.