{"record":{"id":"454956b14d65dbf0","repo":"OtterMind/Chat2DB","slug":"github-event-path-does-not-point-to-an-event-paylo","errorCode":null,"errorMessage":"GITHUB_EVENT_PATH does not point to an event payload","messagePattern":"GITHUB_EVENT_PATH does not point to an event payload","errorType":"validation","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"script/github/notify_qq.py","lineNumber":586,"sourceCode":"    )\n\n\ndef _required_environment() -> tuple[str, str]:\n    names = (\"QQ_RELAY_URL\", \"QQ_RELAY_TOKEN\")\n    missing = [name for name in names if not os.environ.get(name)]\n    if missing:\n        raise ConfigurationError(\"Missing required GitHub Actions secrets: \" + \", \".join(missing))\n    return tuple(os.environ[name] for name in names)  # type: ignore[return-value]\n\n\ndef _is_true(value: str | None) -> bool:\n    return str(value or \"\").strip().lower() in {\"1\", \"true\", \"yes\", \"on\"}\n\n\ndef main() -> int:\n    event_path = Path(os.environ.get(\"GITHUB_EVENT_PATH\", \"\"))\n    if not event_path.is_file():\n        raise ConfigurationError(\"GITHUB_EVENT_PATH does not point to an event payload\")\n\n    with event_path.open(encoding=\"utf-8\") as event_file:\n        payload = json.load(event_file)\n\n    event_name = os.environ.get(\"GITHUB_EVENT_NAME\", \"\")\n    repository = os.environ.get(\"GITHUB_REPOSITORY\", \"OtterMind/Chat2DB\")\n    actor = os.environ.get(\"GITHUB_ACTOR\", \"unknown\")\n    server_url = os.environ.get(\"GITHUB_SERVER_URL\", \"https://github.com\")\n    run_id = os.environ.get(\"GITHUB_RUN_ID\", \"\")\n    run_url = f\"{server_url}/{repository}/actions/runs/{run_id}\" if run_id else \"\"\n    include_url = _is_true(os.environ.get(\"QQ_INCLUDE_URL\", \"true\"))\n\n    prepared_path = os.environ.get(\"QQ_PREPARED_MESSAGE_PATH\")\n    if prepared_path:\n        event_name, message = _read_prepared_message(Path(prepared_path), repository)\n        action = \"prepared\"\n    else:\n        message = build_notification(","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/script/github/notify_qq.py#L568-L604","documentation":"Raised by main (notify_qq.py:586) as a ConfigurationError when GITHUB_EVENT_PATH does not point to an existing file. GitHub Actions writes the event payload to this path; if it is missing or unreadable, the notifier cannot build a notification. This is the first check in main and runs for every mode.","triggerScenarios":"GITHUB_EVENT_PATH is unset (running outside GitHub Actions), empty, or points at a path that does not exist or is a directory. Any execution context lacking the runner's event payload file hits this.","commonSituations":"Running notify_qq.py locally without setting GITHUB_EVENT_PATH/GITHUB_EVENT_NAME; a custom runner that clears the event file; invoking the script from a non-Actions container; the event file removed before the step runs.","solutions":["Run the script only inside a GitHub Actions job where GITHUB_EVENT_PATH is set by the runner.","For local testing, set GITHUB_EVENT_PATH to a real JSON payload file and GITHUB_EVENT_NAME accordingly.","Verify no prior step deletes the event payload file."],"exampleFix":"# local test\nGITHUB_EVENT_PATH=./sample-event.json GITHUB_EVENT_NAME=issues python script/github/notify_qq.py","handlingStrategy":"validation","validationCode":"from pathlib import Path\nevent_path = Path(os.environ.get(\"GITHUB_EVENT_PATH\", \"\"))\nif not event_path.is_file():\n    raise SystemExit(\"GITHUB_EVENT_PATH must point to a real event payload file\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run notify_qq.py inside a GitHub Actions job where the runner sets GITHUB_EVENT_PATH.","For local runs, set GITHUB_EVENT_PATH to a checked-in sample payload and GITHUB_EVENT_NAME."],"tags":["config","github-actions","environment","validation"],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}