Skip to content

Commit 89e8466

Browse files
get fork property in github event correctly
1 parent 102b4b6 commit 89e8466

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)