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

[Question] Create mention when a deploy happens

Open josh803316 opened this issue 2 years ago • 1 comments

Is there a way to enable slack mentions via this github action. I created a Github <-> Slack integration by doing /github login in slack for the user (github.actor) as a way to test, but it didn't seem to work. I did see my github username in the post but it didn't seem to do the mention part.

env:
          ....
          SLACK_MESSAGE: 'Deployed ${{ github.head_ref }} to staging :rocket: <@${{ github.actor }}>'
          ...
          SLACK_LINK_NAMES: true
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEPLOYMENT }}

josh803316 avatar May 01 '22 04:05 josh803316

Discussion started back here

https://github.com/rtCamp/action-slack-notify/discussions/103

jayy-lmao avatar Jul 21 '22 00:07 jayy-lmao

To mention a user, Slack requires you to format in <@USER-ID> format, as specified in their documentation about mentioning users. Therefore, you'd want to get the Slack ID for the user you're looking to mention.

L0RD-ZER0 avatar Mar 11 '24 13:03 L0RD-ZER0