mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 09:30:01 +08:00
feat(server): add real-world prompt test for copilot apis (#8629)
fix AF-1432, PD-1176
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { WebClient } from '@slack/web-api';
|
||||
|
||||
import { render } from './markdown.js';
|
||||
|
||||
const { CHANNEL_ID, SLACK_BOT_TOKEN, COPILOT_RESULT, BRANCH_SHA, BRANCH_NAME } =
|
||||
process.env;
|
||||
|
||||
const { ok } = await new WebClient(SLACK_BOT_TOKEN).chat.postMessage({
|
||||
channel: CHANNEL_ID,
|
||||
text: `AFFiNE Copilot Test ${COPILOT_RESULT}`,
|
||||
blocks: render(
|
||||
`# AFFiNE Copilot Test ${COPILOT_RESULT}
|
||||
|
||||
- [${BRANCH_NAME?.replace('refs/heads/', '') || BRANCH_SHA}](https://github.com/toeverything/AFFiNE/commit/${BRANCH_SHA})
|
||||
`
|
||||
),
|
||||
});
|
||||
|
||||
console.assert(ok, 'Failed to send a message to Slack');
|
||||
Reference in New Issue
Block a user