slack-github-action icon indicating copy to clipboard operation
slack-github-action copied to clipboard

Get branch name

Open Vanals opened this issue 2 years ago • 1 comments

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

Vanals avatar Nov 30 '23 13:11 Vanals

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!

zimeg avatar Nov 30 '23 17:11 zimeg