We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7149d6f commit 1df747eCopy full SHA for 1df747e
.github/scripts/log_event.py
@@ -0,0 +1,23 @@
1
+import os
2
+import json
3
+
4
+def main():
5
+ github_event_name = os.getenv("GITHUB_EVENT_NAME")
6
+ github_event_path = os.getenv("GITHUB_EVENT_PATH")
7
8
+ print(f"Received GitHub event: {github_event_name}")
9
10
+ if not github_event_path:
11
+ print("GITHUB_EVENT_PATH not set, cannot read event data.")
12
+ return
13
14
+ try:
15
+ with open(github_event_path, "r") as file:
16
+ event_data = json.load(file)
17
+ print("Event JSON Payload:")
18
+ print(json.dumps(event_data, indent=2))
19
+ except Exception as e:
20
+ print(f"Error reading event data: {e}")
21
22
+if __name__ == "__main__":
23
+ main()
0 commit comments