{"id":21744633,"url":"https://github.com/github0null/git-webhook-handler","last_synced_at":"2026-04-13T10:31:52.950Z","repository":{"id":100179728,"uuid":"402304498","full_name":"github0null/git-webhook-handler","owner":"github0null","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-28T02:44:41.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T01:42:02.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github0null.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-02T05:45:57.000Z","updated_at":"2021-10-28T02:44:44.000Z","dependencies_parsed_at":"2023-04-25T20:16:11.123Z","dependency_job_id":null,"html_url":"https://github.com/github0null/git-webhook-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/github0null/git-webhook-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fgit-webhook-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fgit-webhook-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fgit-webhook-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fgit-webhook-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github0null","download_url":"https://codeload.github.com/github0null/git-webhook-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fgit-webhook-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31748974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T07:12:10.454Z","updated_at":"2026-04-13T10:31:52.934Z","avatar_url":"https://github.com/github0null.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Gitea/Github web hook handler\n\nA web hook handler for gitea/Github\n\n**Need Python3**\n\n***\n\n## install\n\n1. clone this repo and enter repo folder\n\n2. install python requirements: run `pip3 install -r requirements.txt`\n\n3. install as a service: run `vim /usr/lib/systemd/system/gitwebhook.service`\n\n```shell\n[Unit]\nDescription=gitwebhook\nDocumentation=https://git.github0null.io/root/git-webhook-handler\nAfter=network.target\nWants=network.target\n\n[Service]\nUser=root\nWorkingDirectory=/root\nEnvironment=\"REPOS_JSON_PATH=/root/githook_repos.json\"\nExecStart=/usr/bin/python3 /YOUR_DOWNLOAD_PATH/git-webhook-handler/index.py 18541\nRestart=on-abnormal\nRestartSec=5s\nKillMode=mixed\n\nStandardOutput=syslog\nStandardError=syslog\n\n[Install]\nWantedBy=multi-user.target\n```\n\ncreate a **/root/githook_repos.json** to descrip hook content, like this:\n\n```json\n{\n    \"razius/puppet\": {\n        \"path\": \"/home/puppet\",\n        \"key\": \"MyVerySecretKey\",\n        \"action\": [\n            \"git pull origin master\"\n        ]\n    },\n    \"d3non/somerandomexample/branch:live\": {\n        \"path\": \"/home/exampleapp\",\n        \"key\": \"123456789\",\n        \"action\": [\n            \"git pull origin live\",\n            \"echo execute some commands ...\"\n        ]\n    },\n    \"d3non/somerandomexample/branch:master\": {\n        \"path\": \"/home/exampleapp\",\n        \"key\": \"123456789\",\n        \"action\": [\n            {\n                \"name\": \"update from remote ...\"\n                \"command\": \"git pull origin live\"\n            },\n            {\n                \"name\": \"execute some commands ...\",\n                \"command\": \"echo 'hello !'\"\n            }\n        ]\n    }\n}\n```\n\n4. update service: run `systemctl daemon-reload`\n\n5. launch service: run `systemctl start gitwebhook`\n\n5. check your service status: run `systemctl status gitwebhook`\n\n7. add to nginx, run `vim /etc/nginx.conf`, add these contents\n\n```shell\nserver {\n    listen 80;\n    server_name githook.domain.io;\n    location / {\n        proxy_pass http://localhost:18541;\n        proxy_set_header Host githook.domain.io;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;\n    }\n}\n\n```\n\n**Now, you can use this url: `http://githook.domain.io` to invoke your hook**\n\n- `http://githook.domain.io` is for **gitea** repos\n- `http://githook.domain.io/github` is for **github** repos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0null%2Fgit-webhook-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub0null%2Fgit-webhook-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0null%2Fgit-webhook-handler/lists"}