Skip to content

Commit

Permalink
fix(notify): bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Dec 14, 2023
1 parent 4fea797 commit 3f4e70c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/notify/lib/action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function action({ mode }) {

dingtalk({
markdown: createContent(all),
title: project,
title: all.project || 'bring-it',
token: DingTalkRobotToken,
})
.then(console.log)
Expand Down
4 changes: 2 additions & 2 deletions packages/notify/lib/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export function dingtalk({ markdown, title, token }) {
});
}

export function createContent({ description, type }) {
export function createContent({ project = '未命名项目', type }) {
return `
### ${CCI_JOB_NAME}
[${PROJECT_NAME}](${PROJECT_WEB_URL}) 发布了新的版本
- 所属项目:${description}
- 所属项目:${project}
- 发布类型:${type}
- 版本编号:${npm_package_version}
Expand Down
2 changes: 1 addition & 1 deletion packages/notify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/notify",
"version": "0.0.0",
"version": "0.1.1",
"description": "Send releases notifications",
"license": "MIT",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function http({ url, query, json, method = 'GET' }) {
const io = new URL(url);

for (const [key, value] of Object.entries(query)) {
url.searchParams.set(key, value);
io.searchParams.set(key, value);
}

return fetch(io.href, {
Expand Down

0 comments on commit 3f4e70c

Please sign in to comment.