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
d2d753dd
Commit
d2d753dd
authored
Jun 26, 2025
by
Lin Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add the notify-slack command line
parent
43875f1c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
13 deletions
+19
-13
package.json
package.json
+3
-1
sendDiffToGoogleSheets.ts
...detect_section_selector_masters/sendDiffToGoogleSheets.ts
+0
-12
sendNotifySlack.ts
src/detect_section_selector_masters/sendNotifySlack.ts
+16
-0
No files found.
package.json
View file @
d2d753dd
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
"task:slack"
:
"bun run task && bun run send-diff"
,
"task:slack"
:
"bun run task && bun run send-diff"
,
"task:slack:ai"
:
"bun run task:ai && bun run send-diff"
,
"task:slack:ai"
:
"bun run task:ai && bun run send-diff"
,
"task:gsheet"
:
"bun run task && bun run send-gsheet"
,
"task:gsheet"
:
"bun run task && bun run send-gsheet"
,
"task:gsheet:ai"
:
"bun run task:ai && USE_AI_SELECTORS=true bun run send-gsheet"
"task:gsheet:ai"
:
"bun run task:ai && USE_AI_SELECTORS=true bun run send-gsheet"
,
"notify-slack"
:
"bun run src/detect_section_selector_masters/sendNotifySlack.ts"
}
}
}
}
\ No newline at end of file
src/detect_section_selector_masters/sendDiffToGoogleSheets.ts
View file @
d2d753dd
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
import
{
google
}
from
'googleapis'
;
import
{
google
}
from
'googleapis'
;
import
{
readdirSync
,
readFileSync
}
from
'fs'
;
import
{
readdirSync
,
readFileSync
}
from
'fs'
;
import
{
join
}
from
'path'
;
import
{
join
}
from
'path'
;
import
{
sendSlackMessage
}
from
'../clients/slack'
;
async
function
uploadAllToSheets
()
{
async
function
uploadAllToSheets
()
{
const
useAiSelectors
=
process
.
env
.
USE_AI_SELECTORS
===
'true'
;
const
useAiSelectors
=
process
.
env
.
USE_AI_SELECTORS
===
'true'
;
...
@@ -62,20 +61,9 @@ async function uploadAllToSheets() {
...
@@ -62,20 +61,9 @@ async function uploadAllToSheets() {
}
}
}
}
async
function
notifySlack
()
{
const
webhookUrl
=
process
.
env
.
SLACK_WEBHOOK
!
;
const
nonAiUrl
=
`https://docs.google.com/spreadsheets/d/
${
process
.
env
.
GOOGLE_SHEET_ID
}
/edit`
;
const
aiUrl
=
`https://docs.google.com/spreadsheets/d/
${
process
.
env
.
GOOGLE_SHEET_AI_ID
}
/edit`
;
await
sendSlackMessage
(
webhookUrl
,
{
issue
:
'Inconsistencies are detected in i18n master section template'
,
details
:
`Google Sheet Links:\n- Non-AI selectors:
${
nonAiUrl
}
\n- AI selectors:
${
aiUrl
}
`
});
}
async
function
main
()
{
async
function
main
()
{
try
{
try
{
await
uploadAllToSheets
();
await
uploadAllToSheets
();
await
notifySlack
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
error
(
'Error in task:gsheet workflow:'
,
err
);
console
.
error
(
'Error in task:gsheet workflow:'
,
err
);
process
.
exit
(
1
);
process
.
exit
(
1
);
...
...
src/detect_section_selector_masters/sendNotifySlack.ts
0 → 100644
View file @
d2d753dd
import
{
sendSlackMessage
}
from
'../clients/slack'
;
async
function
main
()
{
const
webhookUrl
=
process
.
env
.
SLACK_WEBHOOK
!
;
const
nonAiUrl
=
`https://docs.google.com/spreadsheets/d/
${
process
.
env
.
GOOGLE_SHEET_ID
}
/edit`
;
const
aiUrl
=
`https://docs.google.com/docs.google.com/spreadsheets/d/
${
process
.
env
.
GOOGLE_SHEET_AI_ID
}
/edit`
;
await
sendSlackMessage
(
webhookUrl
,
{
issue
:
'Inconsistencies are detected in i18n master section template'
,
details
:
`Google Sheet Links:\n- Non-AI selectors:
${
nonAiUrl
}
\n- AI selectors:
${
aiUrl
}
`
});
}
main
().
catch
(
err
=>
{
console
.
error
(
err
);
process
.
exit
(
1
);
});
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