action-slack
action-slack copied to clipboard
Can I mention in costom_payload?
I want to mention in costom_payload, So I put @ before reviewer and inserted it in comtom_payload. like this
env:
REVIEWERS: ${{ format('<@{0}>', join(github.event.pull_request.requested_reviewers.*.login, '>, <@')) }}
with:
custom_payload: |
{
attachments: [{
...
},
{
title: '✅ Reviewers',
value: '- ${{ env.REVIEWERS }} \n',
short: false
},
{
...
}]
}]
}
but @ is not working.
How can I mention in custom_payload?
@ahnjoonheon I am able to mention single users in custom payload. I use the slack user_id in this format: <@U12345> are you sure that env.REVIEWERS is in the format you expect?
To mention a Slack group you need to use the following format:
<!subteam^SUBTEAM-ID|SUBTEAM_NAME>
You can find the subteam ID through a Slack admin in your organization