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

Can I mention in costom_payload?

Open aj172019 opened this issue 3 years ago • 2 comments

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?

aj172019 avatar Dec 03 '21 08:12 aj172019

@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?

sgoodman-r7 avatar Jan 23 '22 17:01 sgoodman-r7

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

gdonati78 avatar Jan 20 '23 11:01 gdonati78