我正在使用
this
action通过Github Actions工作流将消息发布到空闲通道。
我正在建造
payload
如下所示
- name: set slack payload
uses: actions/github-script
with:
script: |
const payload = {
"text": "Some text",
"username": "Some username",
"icon_url": "https://www.ecample.com/icon.png",
"attachments": [
{
"mrkdwn_in": ["text"],
"color": "'#ffffff'",
"fields": [
{
"title": "A title",
"value": "some text",
"short": true
},
{
"title": "Mention",
"value": "<@username> hello",
"short": true
},
]
}
]
}
core.setOutput('payload', payload)
这符合预期,并且
username
确实被提及。
然而,当我用一个松弛的用户组代替它时,它不会被提及。
有什么想法吗?