docs: update README for at mobiles

This commit is contained in:
lddsb
2021-07-02 23:13:05 +08:00
parent 8729ae05b4
commit 526b8eec46
2 changed files with 12 additions and 0 deletions
+5
View File
@@ -99,12 +99,17 @@ String. You can customize the [TPL_BUILD_STATUS] (when status=`success`) by this
String. You can customize the [TPL_BUILD_STATUS] (when status=`failure`) by this configuration item.
`msg_at_mobiles`
String. You want at's phone number in the group, if you need at multi phone numbers, you can use `,` to separate. (if you use markdown type, you need define the at content in your tpl file)
### TPL
> `tpl` won't work with message type `link` !!!
That's a good news, we support `tpl` now.This is an example for `markdown` message:
# [TPL_REPO_FULL_NAME] build [TPL_BUILD_STATUS], takes [TPL_BUILD_CONSUMING]s
@mobile1 @mobile2
[TPL_COMMIT_MSG]
[TPL_COMMIT_SHA]([TPL_COMMIT_LINK])
+7
View File
@@ -101,12 +101,17 @@ steps:
你可以通过该字段自定义运行失败状态的值,可以在模版中通过[TPL_BUILD_STATUS]来使用该值。(仅当前方`step`运行结果为失败时该值会生效)
`msg_at_mobiles`
你需要@的群成员的手机号,多个时用英文逗号(`,`)分隔。如过你使用的是 `markdown` 类型的消息,则需要在 `tpl` 文件中加入 `@手机号` 的内容。
### 模版
> `tpl` 对 `link` 类型的消息并不支持 !!!
感天动地,我们终于支持自定义模版了!下面是一个`markdown`的自定义模版例子:
# [TPL_REPO_FULL_NAME] build [TPL_BUILD_STATUS], takes [TPL_BUILD_CONSUMING]s
@mobile1 @mobile2
[TPL_COMMIT_MSG]
[TPL_COMMIT_SHA]([TPL_COMMIT_LINK])
@@ -115,6 +120,8 @@ steps:
[Click To The Build Detail Page [TPL_STATUS_EMOTICON)]]([TPL_BUILD_LINK])
`mobile1``mobile2` 应该为钉钉对应的手机号码,可以放在自己想要放的位置。
你可以写自己喜欢的模版,终于不用再对默认模版发愁啦!并且模版的语法非常简单!比较可惜的是目前支持的变量还比较少,下面是当前支持的变量的列表:
| Variable | Value |