Skip to content

Commit dadfb1c

Browse files
feat: daily community content push bot (Feishu CN + Discord EN) (#1141)
* feat: add daily community content push bot - daily-content-bot.mjs: LLM-powered bilingual content generation - Feishu cards in Chinese, Discord embeds in English - Sources: HackerNews API + Follow Builders + GitHub API - Themes: tech-news, tech-eco, ai-products, weekly, weekend - community-content-push.yml: 5 cron schedules + workflow_dispatch - 9:00 tech news, 12:00 tech ecosystem, 20:00 AI products (weekdays) - 18:00 Friday weekly digest, 10:00 weekend pick Made-with: Cursor * fix: resolve biome lint errors in daily-content-bot - Use optional chain (s?.title) instead of s && s.title - Export fetchNexuIssues to avoid unused-variable error - Auto-format long lines per biome rules Made-with: Cursor * chore: remove accidentally committed package-lock.json Made-with: Cursor * fix: resolve pre-existing biome lint errors in test files - developer-notify.test.ts: split long toContain/stringContaining lines - skillhub-custom-import.test.ts: prefix unused param with underscore Made-with: Cursor * chore: remove package-lock.json and add to gitignore Made-with: Cursor --------- Co-authored-by: caiqiling958-cmd <>
1 parent e45bba2 commit dadfb1c

5 files changed

Lines changed: 557 additions & 4 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Community Content Push
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 * * 1-5" # 技术资讯 — 工作日北京 9:00
6+
- cron: "0 4 * * 1-5" # 技术生态 — 工作日北京 12:00
7+
- cron: "0 12 * * 1-5" # AI 产品榜单 — 工作日北京 20:00
8+
- cron: "0 10 * * 5" # 周报 — 周五北京 18:00
9+
- cron: "0 2 * * 0,6" # Weekend Pick — 周末北京 10:00
10+
workflow_dispatch:
11+
inputs:
12+
theme:
13+
description: "Content theme to push"
14+
required: true
15+
type: choice
16+
options:
17+
- tech-news
18+
- tech-eco
19+
- ai-products
20+
- weekly
21+
- weekend
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
push:
28+
name: Generate and Push Content
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
sparse-checkout: scripts/notify
34+
35+
- name: Resolve content theme
36+
id: theme
37+
run: |
38+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
39+
echo "theme=${{ inputs.theme }}" >> "$GITHUB_OUTPUT"
40+
else
41+
case "${{ github.event.schedule }}" in
42+
"0 1 * * 1-5") echo "theme=tech-news" >> "$GITHUB_OUTPUT" ;;
43+
"0 4 * * 1-5") echo "theme=tech-eco" >> "$GITHUB_OUTPUT" ;;
44+
"0 12 * * 1-5") echo "theme=ai-products" >> "$GITHUB_OUTPUT" ;;
45+
"0 10 * * 5") echo "theme=weekly" >> "$GITHUB_OUTPUT" ;;
46+
"0 2 * * 0,6") echo "theme=weekend" >> "$GITHUB_OUTPUT" ;;
47+
esac
48+
fi
49+
50+
- name: Generate and send content
51+
env:
52+
CONTENT_THEME: ${{ steps.theme.outputs.theme }}
53+
FEISHU_WEBHOOK_URL: ${{ secrets.COMMUNITY_CONTENT_FEISHU_WEBHOOK }}
54+
DISCORD_WEBHOOK_URL: ${{ secrets.COMMUNITY_CONTENT_DISCORD_WEBHOOK }}
55+
LLM_API_BASE: ${{ secrets.LITELLM_ENDPOINT }}
56+
LLM_API_KEY: ${{ secrets.LITELLM_API_KEY }}
57+
LLM_MODEL: anthropic/claude-sonnet-4
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
run: node scripts/notify/daily-content-bot.mjs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ apps/desktop/build-config.json
4040
.task/
4141
.opencode/
4242
docs/superpowers/
43+
package-lock.json

apps/controller/tests/skillhub-custom-import.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const { SkillDb } = await import("../src/services/skillhub/skill-db.js");
2727

2828
function stubExtractTo(
2929
slug: string,
30-
skillsDir: string,
30+
_skillsDir: string,
3131
opts: { withPackageJson?: boolean } = {},
3232
) {
3333
vi.mocked(extractZipMock).mockImplementationOnce(

0 commit comments

Comments
 (0)