测试一些gitea的webhook功能

This commit is contained in:
2025-09-21 16:08:09 +08:00
parent f6a9229e71
commit a4c40cd3fd

2
app.js
View File

@@ -10,6 +10,8 @@ const { request: undiciRequest } = require('undici');
const GOTIFY_URL = 'https://gotify.zotv.ru/message'; // 例如: 'http://your-gotify-server.com/message' const GOTIFY_URL = 'https://gotify.zotv.ru/message'; // 例如: 'http://your-gotify-server.com/message'
const GOTIFY_TOKEN = 'A1wFaeaj-VskqyF'; // 你的 Gotify 应用 Token const GOTIFY_TOKEN = 'A1wFaeaj-VskqyF'; // 你的 Gotify 应用 Token
//测试一些gitea的webhook功能
// 启动前检查配置是否齐全 // 启动前检查配置是否齐全
if (!GOTIFY_URL || !GOTIFY_TOKEN) { if (!GOTIFY_URL || !GOTIFY_TOKEN) {
console.error('错误:请设置 GOTIFY_URL 和 GOTIFY_TOKEN 环境变量!'); console.error('错误:请设置 GOTIFY_URL 和 GOTIFY_TOKEN 环境变量!');