We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3658561 commit 6818ac3Copy full SHA for 6818ac3
main.py
@@ -16,6 +16,7 @@
16
event_path = os.getenv("GITHUB_EVENT_PATH")
17
sha = os.getenv("GITHUB_SHA")
18
actor = os.getenv("GITHUB_ACTOR")
19
+event_payload = json.load(open(event_path))
20
21
message = {
22
"text": f":rocket: Running *{workflow}* on *{repository}/{branch}* :rocket:",
@@ -55,7 +56,7 @@
55
56
},
57
{
58
"title": "Commit Message",
- "value": '```' + json.load(open(event_path))["commits"][-1]["message"] + '```',
59
+ "value": '```' + event_payload["commits"][-1]["message"] + '```' if event_payload.get("commits") else '',
60
"short": False
61
}
62
],
0 commit comments