Skip to content

Commit dd67b5d

Browse files
author
王允
committed
调通对openclaw 最新版本的定时任务的支持
1 parent 15d8212 commit dd67b5d

11 files changed

Lines changed: 265 additions & 137 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,7 @@ The plugin supports OpenAI-compatible API providers. If not configured in the pl
355355
| Field | Type | Required | Default | Description |
356356
|-------|------|----------|---------|-------------|
357357
| `smtp_host` | string | No | `"smtp.gmail.com"` | SMTP server host |
358-
| `smtp_port` | number | No | `587` | SMTP server port |
359-
| `use_tls` | boolean | No | `true` | Use TLS/STARTTLS |
358+
| `smtp_port` | number | No | `587` | SMTP server port (465 for SSL, 587 for STARTTLS) |
360359
| `sender` | string | Yes* | - | Sender email address |
361360
| `password` | string | Yes* | - | Email password or app-specific password |
362361
| `recipient` | string | No | Same as `sender` | Recipient email address (if not configured, defaults to sender address) |

README_CN.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ openclaw plugins install openclaw-github-trending
9393
},
9494
"email": {
9595
"smtp_host": "smtp.qq.com",
96-
"smtp_port": 587,
96+
"smtp_port": 587, // 建议 QQ 邮箱的话优先使用 587 端口
9797
"sender": "xxx@qq.com",
9898
"password": "xxx",
9999
"recipient": "yyy@qq.com"
@@ -356,8 +356,7 @@ openclaw cron rm <job-id>
356356
| 字段 | 类型 | 必填 | 默认值 | 说明 |
357357
|-------|------|----------|---------|-------------|
358358
| `smtp_host` | string || `"smtp.gmail.com"` | SMTP 服务器地址 |
359-
| `smtp_port` | number || `587` | SMTP 服务器端口 |
360-
| `use_tls` | boolean || `true` | 使用 TLS/STARTTLS |
359+
| `smtp_port` | number || `587` | SMTP 服务器端口(465 为 SSL,587 为 STARTTLS) |
361360
| `sender` | string |* | - | 发件人邮箱地址 |
362361
| `password` | string |* | - | 邮箱密码或应用专用密码 |
363362
| `recipient` | string ||`sender` | 收件人邮箱地址(如未配置,默认使用发件人地址) |

openclaw.plugin.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "openclaw-github-trending",
33
"name": "GitHub Trending",
4-
"version": "1.2.0",
4+
"version": "1.3.0",
55
"description": "Fetch GitHub trending repositories and push to Feishu or Email with AI summaries",
66
"author": "王允",
77
"license": "MIT",
@@ -11,7 +11,7 @@
1111
},
1212
"entry": "dist/index.js",
1313
"engines": {
14-
"openclaw": ">=2026.1.15",
14+
"openclaw": ">=2026.3.13",
1515
"node": ">=18.0.0"
1616
},
1717
"configSchema": {
@@ -80,12 +80,7 @@
8080
"smtp_port": {
8181
"type": "number",
8282
"default": 587,
83-
"description": "SMTP server port"
84-
},
85-
"use_tls": {
86-
"type": "boolean",
87-
"default": true,
88-
"description": "Use TLS/STARTTLS"
83+
"description": "SMTP server port (465 for SSL, 587 for STARTTLS)"
8984
},
9085
"sender": {
9186
"type": "string",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openclaw-github-trending",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "OpenClaw plugin for fetching GitHub trending repositories and pushing to Feishu or Email with AI summaries",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/channels/email.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ export class EmailChannel {
474474
${contentHTML}
475475
<footer class="footer">
476476
<p>本邮件由 GitHub 热榜机器人自动生成</p>
477-
<p><a href="https://github.com/indigos" class="link" aria-label="访问 GitHub Trending 主页">GitHub Trending</a></p>
477+
<p><a href="https://github.com/wy-ruby/openclaw-github-trending" class="link" aria-label="访问 GitHub Trending 主页">GitHub Trending</a></p>
478478
</footer>
479479
</div>
480480
</body>
@@ -562,7 +562,7 @@ export class EmailChannel {
562562
user: config.smtp.auth.user,
563563
pass: config.smtp.auth.pass
564564
},
565-
logger: false,
565+
logger: true,
566566
debug: false
567567
});
568568

src/core/config.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export interface OpenClawGlobalConfig {
4343
export interface SMTPConfig {
4444
smtp_host: string;
4545
smtp_port: number;
46-
use_tls: boolean;
4746
sender: string;
4847
password: string;
4948
from_name: string;
@@ -169,7 +168,6 @@ export class ConfigManager {
169168
return {
170169
smtp_host: pluginEmailConfig.smtp_host,
171170
smtp_port: pluginEmailConfig.smtp_port || 587,
172-
use_tls: pluginEmailConfig.use_tls ?? true,
173171
sender: pluginEmailConfig.sender || email,
174172
password: pluginEmailConfig.password || password,
175173
from_name: pluginEmailConfig.from_name || 'GitHub Trending',
@@ -183,29 +181,24 @@ export class ConfigManager {
183181
interface EmailPreset {
184182
smtp_host: string;
185183
smtp_port: number;
186-
use_tls: boolean;
187184
}
188185

189186
const presets: { [key: string]: EmailPreset } = {
190187
'qq.com': {
191188
smtp_host: 'smtp.qq.com',
192-
smtp_port: 587,
193-
use_tls: true
189+
smtp_port: 587
194190
},
195191
'163.com': {
196192
smtp_host: 'smtp.163.com',
197-
smtp_port: 587,
198-
use_tls: true
193+
smtp_port: 587
199194
},
200195
'gmail.com': {
201196
smtp_host: 'smtp.gmail.com',
202-
smtp_port: 587,
203-
use_tls: true
197+
smtp_port: 587
204198
},
205199
'aliyun.com': {
206200
smtp_host: 'smtp.aliyun.com',
207-
smtp_port: 587,
208-
use_tls: true
201+
smtp_port: 587
209202
}
210203
};
211204

@@ -214,7 +207,6 @@ export class ConfigManager {
214207
return {
215208
smtp_host: preset.smtp_host,
216209
smtp_port: preset.smtp_port,
217-
use_tls: preset.use_tls,
218210
sender: email,
219211
password: password,
220212
from_name: 'GitHub Trending',

0 commit comments

Comments
 (0)