Skip to content

Commit 700df58

Browse files
committed
Initial commit: Clean repository with new content
0 parents  commit 700df58

16 files changed

+2044
-0
lines changed

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp
4+
.pnp.js
5+
6+
# Build outputs
7+
dist/
8+
build/
9+
10+
# Environment files
11+
.env
12+
.env.local
13+
.env.development.local
14+
.env.test.local
15+
.env.production.local
16+
17+
# Debug logs
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
pnpm-debug.log*
22+
23+
# Editor directories and files
24+
.vscode/
25+
.idea/
26+
*.suo
27+
*.ntvs*
28+
*.njsproj
29+
*.sln
30+
*.sw?
31+
32+
# System files
33+
.DS_Store
34+
Thumbs.db
35+
36+
# Cloudflare specific
37+
.wrangler/
38+
.dev.vars
39+
40+
# Testing
41+
coverage/
42+
43+
# Temporary files
44+
*.log
45+
*.tmp
46+
47+
# IDE
48+
.vscode/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 gitpush
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# GitPush
2+
3+
English | [简体中文](README_CN.md)
4+
5+
An AI-powered GitHub Release Tracker that monitors your favorite repositories, summarizes updates using AI, and delivers them straight to your inbox.
6+
7+
## Technology Stack
8+
9+
GitPush is built on four core Cloudflare services:
10+
11+
- **Workers**: Serverless runtime environment for the application
12+
- **Workflows**: Automated pipeline for release monitoring and processing
13+
- **Workers AI**: AI-powered release summary generation with DeepSeek R1
14+
- **Email Routing**: Reliable email notification delivery system
15+
16+
## Configuration
17+
18+
### Environment Variables
19+
20+
> **Security Note**: It is recommended to configure these environment variables through the Cloudflare Workers dashboard instead of storing them in the `wrangler.jsonc` file to prevent sensitive information from being exposed on GitHub.
21+
22+
| Variable Name | Description | Example | Notes |
23+
|---------------|-------------|---------|--------|
24+
| `GITHUB_REPOS` | GitHub repositories to monitor | "https://github.com/owner/repo1,https://github.com/owner/repo2" | Use commas to separate multiple repositories |
25+
| `EMAIL_FROM_ADDRESS` | Notification sender email | "noreply@yourdomain.com" | Must be configured in Cloudflare like [this](https://developers.cloudflare.com/email-routing/setup/email-routing-addresses/) |
26+
| `EMAIL_TO_ADDRESS` | Notification recipient email,must match your destination_address | "your.email@domain.com" | Must be configured in Cloudflare like [this](https://developers.cloudflare.com/email-routing/setup/email-routing-addresses/) |
27+
| `GITHUB_TOKEN` | GitHub Personal Access Token | "xxxxxxxxxxxx" | Optional. Not required for personal use (60 unauthenticated requests/hour. You can get [More deails](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28) here. |
28+
29+
### Other Configuration on `wrangler.jsonc`
30+
| Configuration | Description | Example | Notes |
31+
|--------------|-------------|---------|--------|
32+
| `send_email.destination_address` | Notification recipient email | "your.email@domain.com" | Must match EMAIL_TO_ADDRESS |
33+
| `triggers.crons` | Schedule for monitoring repositories | "0 1 * * *" | Cron expression format (e.g., "0 1 * * *" means run at 1 AM daily and check updates from the past 24 hours) |
34+
35+
## Deployment
36+
37+
> **Note**: This project is designed to run on Cloudflare Workers and requires Cloudflare's infrastructure. It cannot be run locally due to its dependencies on Cloudflare-specific features like Email API and AI capabilities.
38+
39+
```bash
40+
pnpm install
41+
pnpm run deploy
42+
```
43+
44+
## Usage
45+
46+
### Automatic Updates
47+
48+
Once deployed, GitPush will automatically:
49+
- Run daily at 1 AM (configurable via `triggers.crons` in `wrangler.jsonc`)
50+
- Check for new releases in your monitored repositories
51+
- Send email notifications if updates are found
52+
53+
### Manual Triggers
54+
55+
Besides automatic updates, you can also manually trigger the workflow in two ways:
56+
57+
1. **Using cURL Command**
58+
59+
Send a POST request with your target repositories:
60+
61+
```bash
62+
curl -X POST https://your-worker.workers.dev \
63+
-H "Content-Type: application/json" \
64+
-d '{
65+
"repo_urls": [
66+
"https://github.com/owner/repo1",
67+
"https://github.com/owner/repo2"
68+
]
69+
}'
70+
```
71+
72+
2. **Using Cloudflare Dashboard**
73+
74+
- Go to [Cloudflare Dashboard](https://dash.cloudflare.com)
75+
- Navigate to Compute(Workers) > Workflows > Your Workflow
76+
- Click "Trigger" button
77+
- Input your target repositories and trigger the workflow
78+
79+
```json
80+
{
81+
"repo_urls": [
82+
"https://github.com/owner/repo1",
83+
"https://github.com/owner/repo2"
84+
]
85+
}
86+
```
87+
88+
### Monitoring
89+
90+
To monitor the workflow execution:
91+
1. Go to [Cloudflare Dashboard](https://dash.cloudflare.com)
92+
2. Navigate to Compute(Workers) > Workflows > Your Workflow
93+
3. Here you can view:
94+
- Execution history
95+
- Success/failure status
96+
- Detailed logs for each step
97+
- Email delivery status

README_CN.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# GitPush
2+
3+
[English](README.md) | 简体中文
4+
5+
一个基于 AI 的 GitHub Release 追踪器,监控你关注的仓库,使用 AI 总结更新内容,并直接发送到你的邮箱。
6+
7+
## 技术栈
8+
9+
GitPush 基于四个核心的 Cloudflare 服务构建:
10+
11+
- **Workers**:应用程序的无服务器运行环境
12+
- **Workflows**:用于发布监控和处理的自动化流水线
13+
- **Workers AI**:使用 DeepSeek R1 进行 AI 驱动的发布内容总结
14+
- **Email Routing**:可靠的邮件通知投递系统
15+
16+
## 配置
17+
18+
### 环境变量
19+
20+
> **安全提示**:建议通过 Cloudflare Workers 仪表板配置这些环境变量,而不是将它们存储在 `wrangler.jsonc` 文件中,以防止敏感信息在 GitHub 上暴露。
21+
22+
| 变量名 | 描述 | 示例 | 备注 |
23+
|---------------|-------------|---------|--------|
24+
| `GITHUB_REPOS` | 需要监控的 GitHub 仓库 | "https://github.com/owner/repo1,https://github.com/owner/repo2" | 使用逗号分隔多个仓库 |
25+
| `EMAIL_FROM_ADDRESS` | 通知发送者邮箱 | "noreply@yourdomain.com" | 必须在 Cloudflare 中配置,参考[这里](https://developers.cloudflare.com/email-routing/setup/email-routing-addresses/) |
26+
| `EMAIL_TO_ADDRESS` | 通知接收者邮箱,必须与 destination_address 匹配 | "your.email@domain.com" | 必须在 Cloudflare 中配置,参考[这里](https://developers.cloudflare.com/email-routing/setup/email-routing-addresses/) |
27+
| `GITHUB_TOKEN` | GitHub 个人访问令牌 | "xxxxxxxxxxxx" | 可选。个人使用不需要(每小时 60 个未认证请求。更多详情参考[这里](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28)|
28+
29+
### `wrangler.jsonc` 中的其他配置
30+
| 配置项 | 描述 | 示例 | 备注 |
31+
|--------------|-------------|---------|--------|
32+
| `send_email.destination_address` | 通知接收者邮箱 | "your.email@domain.com" | 必须与 EMAIL_TO_ADDRESS 匹配 |
33+
| `triggers.crons` | 仓库监控计划 | "0 1 * * *" | Cron 表达式格式(例如,"0 1 * * *" 表示每天凌晨 1 点运行,检查过去 24 小时的更新) |
34+
35+
## 部署
36+
37+
> **注意**:本项目设计为在 Cloudflare Workers 上运行,需要 Cloudflare 的基础设施。由于依赖 Cloudflare 特有的功能(如 Email API 和 AI 功能),无法在本地运行。
38+
39+
```bash
40+
pnpm install
41+
pnpm run deploy
42+
```
43+
44+
## 使用方法
45+
46+
### 自动更新
47+
48+
部署完成后,GitPush 将自动:
49+
- 每天凌晨 1 点运行(可通过 `wrangler.jsonc` 中的 `triggers.crons` 配置)
50+
- 检查你监控的仓库中的新发布
51+
- 如果发现更新,发送邮件通知
52+
53+
### 手动触发
54+
55+
除了自动更新,你还可以通过以下两种方式手动触发工作流:
56+
57+
1. **使用 cURL 命令**
58+
59+
发送带有目标仓库的 POST 请求:
60+
61+
```bash
62+
curl -X POST https://your-worker.workers.dev \
63+
-H "Content-Type: application/json" \
64+
-d '{
65+
"repo_urls": [
66+
"https://github.com/owner/repo1",
67+
"https://github.com/owner/repo2"
68+
]
69+
}'
70+
```
71+
72+
2. **使用 Cloudflare 仪表板**
73+
74+
- 访问 [Cloudflare 仪表板](https://dash.cloudflare.com)
75+
- 导航到 Compute(Workers) > Workflows > 你的工作流
76+
- 点击 "Trigger" 按钮
77+
- 输入你的目标仓库并触发工作流
78+
79+
```json
80+
{
81+
"repo_urls": [
82+
"https://github.com/owner/repo1",
83+
"https://github.com/owner/repo2"
84+
]
85+
}
86+
```
87+
88+
### 监控
89+
90+
要监控工作流执行情况:
91+
1. 访问 [Cloudflare 仪表板](https://dash.cloudflare.com)
92+
2. 导航到 Compute(Workers) > Workflows > 你的工作流
93+
3. 在这里你可以查看:
94+
- 执行历史
95+
- 成功/失败状态
96+
- 每个步骤的详细日志
97+
- 邮件投递状态

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "gitpush",
3+
"version": "0.0.1",
4+
"scripts": {
5+
"deploy": "wrangler deploy",
6+
"start": "wrangler dev",
7+
"build": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=esm --platform=neutral --external:cloudflare:*"
8+
},
9+
"devDependencies": {
10+
"@cloudflare/workers-types": "^4.20250224.0",
11+
"esbuild": "0.21.4",
12+
"typescript": "^5.0.4",
13+
"wrangler": "^3.111.0"
14+
},
15+
"packageManager": "pnpm@9.1.4",
16+
"engines": {
17+
"pnpm": "^9.1.4"
18+
},
19+
"pnpm": {
20+
"overrides": {
21+
"esbuild": "0.21.4"
22+
}
23+
},
24+
"dependencies": {}
25+
}

0 commit comments

Comments
 (0)