Slack integration - github username?


#1

Hi guys!

We are using the slack integration to send deployment notifications, with the default format:

[#${execution.id}] <${project.html_url}|${project.display_name}> deployment triggered by <${execution.creator.html_url}|${execution.creator.name}>

but the execution.creator.name is always the same person, me - as I created the project on buddy.

Is there anyway to get the username of the person who triggered the build? (e.g username from github if triggered from a push or tag). I’ve looked at the example execution object: https://buddy.works/knowledge/deployments/how-add-slack-integration but that data does not seem to be there.

The github hook does include that data: https://developer.github.com/v3/activity/events/types/#pushevent

Thanks!


#2

Hey @joelwmale

you can try using param: $BUDDY_EXECUTION_REVISION_COMMITTER_EMAIL. There’s no other way, I’m afraid.


#3

I’m interested in this functionality as well. We would like to pass the GitHub username to the Slack Notification.

We are sending the following Slack Notification upon successful execution of a Pipeline triggered from a GitHub push:

[
    {
        "author_name": "${BUDDY_INVOKER_NAME}"
    }
]

But, we would like to pass the committers GitHub username. Is there a Default Environment Variables available? If no, any other advice on how to acquire the GitHub username of the committer?

We thought ${BUDDY_INVOKER_NAME} should be correct, but it is not. We tried ${BUDDY_EXECUTION_REVISION_COMMITTER_EMAIL} and that is not correct either.