文件
xiaozhongchuf/public/gitea_webhook.php
2026-09-23 17:46:31 +08:00

19 行
519 B
PHP

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<?php
/**
* Gitea Web 钩子入口(仅 POST + 签名校验)
* 配置:项目根目录 deploy/config.php(勿提交仓库)
*/
$configFile = dirname(__DIR__) . '/deploy/config.php';
if (!is_file($configFile)) {
http_response_code(500);
header('Content-Type: text/plain; charset=utf-8');
echo 'Missing deploy/config.php — copy deploy/config.example.php';
exit;
}
$config = require $configFile;
require dirname(__DIR__) . '/deploy/WebhookDeploy.php';
(new WebhookDeploy($config))->handle();