Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/website/docs/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def _initial_providers():
yield



def pytest_configure(config):
# push sentry to ci
os.environ["RUNTIME__SENTRY_DSN"] = "https://6f6f7b6f8e0f458a89be4187603b55fe@o1061158.ingest.sentry.io/4504819859914752"
28 changes: 15 additions & 13 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,21 @@ def skip_if_not_active(destination: str) -> None:


def is_running_in_github_fork() -> bool:
event_path = os.environ["GITHUB_EVENT_PATH"]

# Extract necessary information from the GitHub Actions event payload
with open(event_path, encoding="utf-8") as f:
event_data = dlt.common.json.load(f)

# Check if the pull request is from a fork
is_pull_request_from_fork = (
event_data.get("pull_request", {})
.get("head", {})
.get("repo", {})
.get("fork", False)
)
event_path = os.environ.get("GITHUB_EVENT_PATH")
is_pull_request_from_fork = False

if event_path:
# Extract necessary information from the GitHub Actions event payload
with open(event_path, encoding="utf-8") as f:
event_data = dlt.common.json.load(f)

# Check if the pull request is from a fork
is_pull_request_from_fork = (
event_data.get("pull_request", {})
.get("head", {})
.get("repo", {})
.get("fork", False)
)

return is_pull_request_from_fork

Expand Down