Skip to content

Commit

Permalink
feat(notify): levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Dec 22, 2023
1 parent fca9d9c commit b5e4d66
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 278 deletions.
28 changes: 17 additions & 11 deletions packages/notify/lib/action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,24 @@ export async function action({ mode }) {

logger.json({ mode, ...all });

dingtalk({
markdown: createContent(all),
title: all.project || '版本发布通知',
token: DingTalkRobotToken,
})
.then((resp) => {
logger.okay(resp);
const { markdown, levels } = createContent(all);

logger.json({ levels });

if (markdown) {
dingtalk({
markdown,
title: all.project || '版本发布通知',
token: DingTalkRobotToken,
})
.catch((error) => {
console.error(error);
process.exitCode = 1;
});
.then((resp) => {
logger.okay(resp);
})
.catch((error) => {
console.error(error);
process.exitCode = 1;
});
}
} catch (error) {
logger.fail(error.message);
}
Expand Down
Loading

0 comments on commit b5e4d66

Please sign in to comment.