Skip to content

Commit 0b25a26

Browse files
refactoring
1 parent 553a192 commit 0b25a26

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

codeflash/api/cfapi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ def add_code_context_hash(code_context_hash: str) -> None:
240240
return
241241
try:
242242
owner, repo = get_repo_owner_and_name()
243+
# don't add the context hash for codeflash repo
244+
if f"{owner}/{repo}" != "codeflash-ai/codeflash":
245+
return
243246
pr_number = get_pr_number()
244247
except git.exc.InvalidGitRepositoryError:
245248
return

codeflash/optimization/function_optimizer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,7 @@ def optimize_function(self) -> Result[BestOptimization, str]:
335335
test_functions_to_remove=test_functions_to_remove,
336336
concolic_test_str=concolic_test_str,
337337
)
338-
339-
# Add function to code context hash if in gh actions
340-
338+
# don't add the context hash for codeflash repo
341339
add_code_context_hash(code_context.hashing_code_context_hash)
342340

343341
if self.args.override_fixtures:

0 commit comments

Comments
 (0)