Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
Falcon
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Walter Huang
Falcon
Commits
d9224c9a
Commit
d9224c9a
authored
Jun 26, 2025
by
Haohao Jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: send test msg
parent
932242e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
index.ts
index.ts
+18
-4
No files found.
index.ts
View file @
d9224c9a
// @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
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment