Commit d9224c9a by Haohao Jiang

fix: send test msg

parent 932242e2
// @ts-ignore
console.log('Hello world!')
console.log('当前可用的 ENV key 的前 3 个字母:');
import { sendSlackMessage } from './src/clients/slack';
// @ts-ignore
Object.keys(Bun.env).forEach(key => {
console.log(key.slice(0, 3));
});
const webhookUrl = Bun.env.SLACK_WEBHOOK;
if (!webhookUrl) {
console.error('请先设置环境变量 SLACK_WEBHOOK');
} else {
sendSlackMessage(webhookUrl, {
issue: 'TEST slack message from index.ts',
displayName: 'Haohao',
language: 'en',
siteEditor: 'https://www.strikingly.com/s/sites/12572142/edit'
}).then(() => {
console.log('消息已发送到 Slack!');
}).catch(err => {
console.error('发送失败:', err);
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment