Skip to content

Commit b9741c0

Browse files
committed
Update main.py
1 parent 7bc6bac commit b9741c0

File tree

1 file changed

+1
-5
lines changed
  • .github/actions/log_to_splunk

1 file changed

+1
-5
lines changed

.github/actions/log_to_splunk/main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,12 @@ def main():
6161

6262
summary.pop('head_repository')
6363

64-
print(json.dumps(summary))
65-
6664
utc_time = datetime.strptime(summary["updated_at"], "%Y-%m-%dT%H:%M:%SZ")
6765
epoch_time = (utc_time - datetime(1970, 1, 1)).total_seconds()
6866

69-
event={'event':json.dumps(summary),'sourcetype':SPLUNK_SOURCETYPE,'source':'workflow_sumary','host':host,'time':epoch_time}
67+
event={'event':json.dumps(summary),'sourcetype':SPLUNK_SOURCETYPE,'source':'workflow_summary','host':host,'time':epoch_time}
7068
event=json.dumps(event)
7169

72-
print(event)
73-
7470
x=requests.post(SPLUNK_HEC_URL, data=event, headers=headers)
7571

7672

0 commit comments

Comments
 (0)