slack-github-action
slack-github-action copied to clipboard
Get branch name
Description
Did anyone managed to get and to show the branch name of what was just being merged to main?
Expected result:
Notify devs of a failing workflow running on main, and mention the branch related to the commit
Hey @Vanals! The branch name can be obtained from github.event.pull_request.head.ref and sent after failures using a workflow like this.
Please note that these jobs only runs on closed pull requests that were merged to main and only sends a message if a previous step failed, so please adjust it however you'd like!