From ef89333873e60f95549eb43b1ac38899b245f2c5 Mon Sep 17 00:00:00 2001 From: ubergeek Date: Mon, 7 Feb 2022 12:51:21 +0000 Subject: [PATCH] just some cleanup of the webhook code --- githook.php | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/githook.php b/githook.php index 2ddea9a..7510c19 100644 --- a/githook.php +++ b/githook.php @@ -119,8 +119,8 @@ elseif ($data["repository"]["full_name"] == 'thunix/wiki') { } } -// Easter egg for anyone probing the hook. Enjoy. We're a coffee maker -// and not a teapot :) +// Easter egg for anyone probing the hook. Enjoy. We're a tea pot +// and not a coffee maker :) else { http_response_code(418); echo "HTTP 418 - I'm a teapot.\n"; @@ -128,22 +128,5 @@ else { exit(0); } -/*$fp = pfsockopen( "tcp://127.0.0.1", 1234, $errno, $errstr ); - -if (!$fp) -{ - echo "ERROR: $errno - $errstr
\n"; -} -socket_set_timeout ($fp, 10); -$msg = "Commit '".$data['commits'][0]["message"]."' was pushed to ".$data["repository"]["full_name"].' by '.$data["pusher"]["login"]; -$msg = trim(preg_replace('/\s+/', ' ', $msg)); -$write = fwrite ($fp, $msg); -fclose($fp); - -if (!$write) { - echo "error writing to port.
"; - next; -} -*/ ?>