rtCamp/action-slack-notify

User mention

Closed this issue · 3 comments

Hi guys,

is it possible somehow to mention user in slack that is responsible for workflow invocation?
I tried to use SLACK_MESSAGE: ":bearded_person: Test notification: ghcom-actions/rtcamp-action-slack-notify@v2\n @${{ github.actor }} :rocket: "

but the message looks like that:
Screenshot 2021-05-19 at 16 43 47

You can mention a user using slack mention. Ref: https://api.slack.com/reference/surfaces/formatting#mentioning-users

The syntax for it will be something like:

SLACK_MESSAGE: ":bearded_person: Test notification: ghcom-actions/rtcamp-action-slack-notify@v2\n <@SLACKUSERID> :rocket: "

Where you replace the SLACKUSERID with the user id you get from the user's slack profile as shown in this image.

Unfortunately, you will need the user id of the person you want to tag, and the dynamic behaviour that you are trying to achieve via @${{ github.actor }} will not be possible.

Unfortunately, you will need the user id of the person you want to tag, and the dynamic behaviour that you are trying to achieve via @${{ github.actor }} will not be possible.

Is it possible to dynamically tag the user below? Would it be great if it has the feature. (ok, forget about this, I mixed github user and slack user ...)

image