将Slack通知从appveyor发送到私人频道时出错

时间:2016-01-17 10:39:33

标签: api notifications slash appveyor

我尝试使用以下配置({em> xxxxxx 是我的令牌加密Appveyor)为我的私人频道设置了阻止通知here

notifications:
  - provider: Slack
    channel: dev
    auth_token:
      secure: xxxxxx

我的Appveyor build告诉我以下错误:

Error sending Slack notification: Error sending Slack message: channel_not_found

使用以下网址测试Slash api时,它可以正常工作:https://slack.com/api/chat.postMessage?token=xxxxxx&channel=dev&text=hello&pretty=1(其中 xxxxxx 是我的令牌,没有加密)。

如果频道不是私密的,它也有效。

2 个答案:

答案 0 :(得分:1)

尝试将#dev置于channel设置中:

notifications:
  - provider: Slack
    channel: '#dev'
    auth_token:
      secure: xxxxxx

此外,代替auth令牌尝试使用Incoming Webhook配置它,其中频道在webhook网址中进行编码。

答案 1 :(得分:1)

这是因为现在修复了一个错误:https://github.com/appveyor/ci/issues/623