diff --git a/packages/cli/package.json b/packages/cli/package.json index 45555a6..b0d84ad 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/cli", - "version": "0.8.0", + "version": "0.8.1", "description": "Common command line interface of 'bring-it'", "license": "MIT", "author": { diff --git a/packages/notify/lib/action.mjs b/packages/notify/lib/action.mjs index 8149c35..85fe165 100644 --- a/packages/notify/lib/action.mjs +++ b/packages/notify/lib/action.mjs @@ -27,11 +27,11 @@ export async function action({ mode }) { dingtalk({ markdown: createContent(all), - title: all.project || 'bring-it', + title: all.project || '版本发布通知', token: DingTalkRobotToken, }) .then((resp) => { - logger.okay(resp.status); + logger.okay(resp); }) .catch((error) => { console.error(error); diff --git a/packages/notify/lib/utils.mjs b/packages/notify/lib/utils.mjs index f4d4819..42e114c 100644 --- a/packages/notify/lib/utils.mjs +++ b/packages/notify/lib/utils.mjs @@ -38,22 +38,36 @@ export function dingtalk({ markdown, title, token }) { }); } -export function createContent({ project = '未命名项目', type, manual = true }) { +export function createContent({ + project = '未命名项目', + type, + manual = true, + banner, +}) { return toMarkdown({ type: 'root', children: [ - CCI_JOB_NAME + banner ? { - type: 'heading', - depth: 3, + type: 'paragraph', children: [ { - type: 'text', - value: CCI_JOB_NAME, + type: 'image', + url: banner, }, ], } : undefined, + { + type: 'heading', + depth: 3, + children: [ + { + type: 'text', + value: CCI_JOB_NAME || '自动化任务', + }, + ], + }, { type: 'paragraph', children: [ diff --git a/packages/notify/package.json b/packages/notify/package.json index d0d2285..6f4cf6e 100644 --- a/packages/notify/package.json +++ b/packages/notify/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/notify", - "version": "0.1.2", + "version": "0.1.3", "description": "Send releases notifications", "license": "MIT", "author": { diff --git a/packages/npm/package.json b/packages/npm/package.json index c0ffec5..02c82ab 100644 --- a/packages/npm/package.json +++ b/packages/npm/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/npm", - "version": "0.4.0", + "version": "0.4.1", "description": "Publish npm packages when needed", "license": "MIT", "author": { diff --git a/packages/sample/package.json b/packages/sample/package.json index e835a0e..54e03e4 100644 --- a/packages/sample/package.json +++ b/packages/sample/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sample", - "version": "0.3.0", + "version": "0.3.1", "description": "Generate code sample files", "license": "MIT", "author": { diff --git a/packages/sentry/package.json b/packages/sentry/package.json index 1fde8b7..e104874 100644 --- a/packages/sentry/package.json +++ b/packages/sentry/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sentry", - "version": "0.3.0", + "version": "0.3.1", "description": "Update sentry artifacts", "license": "MIT", "author": { diff --git a/packages/sftp/package.json b/packages/sftp/package.json index 39968e6..5d21c61 100644 --- a/packages/sftp/package.json +++ b/packages/sftp/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sftp", - "version": "0.2.0", + "version": "0.2.1", "description": "SFTP deployment tool for frontend", "license": "MIT", "author": { diff --git a/packages/utils/index.mjs b/packages/utils/index.mjs index bde3ede..87e7f52 100644 --- a/packages/utils/index.mjs +++ b/packages/utils/index.mjs @@ -87,5 +87,5 @@ export function http({ url, query, json, method = 'GET' }) { 'Content-Type': 'application/json', }, body: JSON.stringify(json), - }); + }).then((response) => response.json()); }