Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_SERVER['HTTP_X_GITLAB_TOKEN'] == 'RG5sd9W1G95cH5i9uisfddfRV1QhdsfbBrK64xmw32d') {
- $request = json_decode(file_get_contents('php://input'));
- if($request->ref == 'refs/heads/master') {
- $gitMessage = shell_exec('git pull origin master');
- file_put_contents(
- __DIR__ . '/git.log',
- var_export($gitMessage, true),
- FILE_APPEND
- );
- }
- } else {
- http_response_code(403);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement