Ilshidur / action-slack

🚀 (Unmaintained) GitHub Action that sends a Slack notification.

Home Page:https://github.com/marketplace/actions/github-action-for-slack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrieving Commit Message on Push

lamw opened this issue · comments

Hi,

Awesome plugin! I'm currently using this right now, but I'm having some difficulty with retrieving a Push Commit Title/Message and sending that to Slack? I'm looking at the EventType info, I only see commit[], but when I try to access it using {{EVENT_PAYLOAD .commmit}} or {{EVENT_PAYLOAD.commit[0].message}}, it fails. Would you know what the right syntax would be to send both the commit title/description?

Hello.

Thank for the feedback. Can you try using {{ EVENT_PAYLOAD.commits[0].message }} ?

Ah, that did the trick! I think I had tried commits[0] earlier but wasn't sure what the sub properties were. Thank you very much!