Skip to content

Commit d15203e

Browse files
Merge pull request #572 from codeflash-ai/fix/is-repo-a-fork
[FIX] Get fork property in github event correctly
2 parents 102b4b6 + 89e8466 commit d15203e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codeflash/code_utils/env_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_cached_gh_event_data() -> dict[str, Any]:
111111

112112
def is_repo_a_fork() -> bool:
113113
event = get_cached_gh_event_data()
114-
return bool(event.get("repository", {}).get("fork", False))
114+
return bool(event.get("pull_request", {}).get("head", {}).get("repo", {}).get("fork", False))
115115

116116

117117
@lru_cache(maxsize=1)

0 commit comments

Comments
 (0)