Skip to content

Commit 5f82256

Browse files
committed
更新
1 parent 0b594ae commit 5f82256

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# webhooks
22
git webhooks
3+
4+
##配置要求
5+
php.ini 开启shell_exec函数
6+
http请求头:Content_type = application/json

github.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@
2929
$res_log = '-------------------------'.PHP_EOL;
3030
$res_log .= $content['pusher']['name'] . '' . date('Y-m-d H:i:s') . '' . $content['repository']['name'] . '项目的' . $content['ref'] . '分支push了'. PHP_EOL;
3131
$res_log .= $res.PHP_EOL;
32-
file_put_contents("git-webhook.txt", $res_log, FILE_APPEND);//追加写入
32+
file_put_contents("git-webhook.txt", $res_log, FILE_APPEND);//追加写入
33+
34+
echo 'success';

gitlab.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@
2424
$res_log .= $content['user_name'] . '' . date('Y-m-d H:i:s') . '' . $content['repository']['name'] . '项目的' . $content['ref'] . '分支push了' . $content['total_commits_count'] . '个commit:' . PHP_EOL;
2525
$res_log .= $res.PHP_EOL;
2626
file_put_contents("git-webhook.txt", $res_log, FILE_APPEND);//追加写入
27+
echo 'success';
2728
}

0 commit comments

Comments
 (0)