Skip to content

这个插件发起的通知里面可以把 @被通知人 插入消息中间,而不是结尾吗? #305

@huxiang

Description

@huxiang

使用 Python 计算签名,再用 http post 的方法发送通知:

DingTalk.send_message({
    "msgtype": "markdown",
    "markdown": {
        "title": "测试标题",
        "text": "测试消息开始 @139xxxxxxxx 测试消息结束",
    },
    "at": {
        "atMobiles": ['139xxxxxxxx']
    }
})

这样得到的消息大概是这样 (抱歉,不方便截图)

测试消息开始 @被通知人 测试消息结束

但是使用 Jenkins 钉钉插件,得到的的消息是这样的

测试消息开始 @被通知人 测试消息结束
@被通知人

官方文档也有样例: https://jenkinsci.github.io/dingtalk-plugin/guide/freestyle.html

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions