{"id":16402965,"url":"https://github.com/suhay/github-webhooks-listener","last_synced_at":"2026-05-18T05:32:48.417Z","repository":{"id":45883655,"uuid":"275606630","full_name":"suhay/github-webhooks-listener","owner":"suhay","description":"A simple listener that will trigger custom scripts when it receives events from GitHub.","archived":false,"fork":false,"pushed_at":"2021-11-30T01:06:24.000Z","size":40,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-05T05:24:52.954Z","etag":null,"topics":["github","github-webhooks-listener","hacktoberfest","python3","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suhay.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}},"created_at":"2020-06-28T14:52:34.000Z","updated_at":"2023-02-23T18:28:14.000Z","dependencies_parsed_at":"2022-09-10T16:24:27.650Z","dependency_job_id":null,"html_url":"https://github.com/suhay/github-webhooks-listener","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhay%2Fgithub-webhooks-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhay%2Fgithub-webhooks-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhay%2Fgithub-webhooks-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhay%2Fgithub-webhooks-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suhay","download_url":"https://codeload.github.com/suhay/github-webhooks-listener/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240339583,"owners_count":19785957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["github","github-webhooks-listener","hacktoberfest","python3","webhooks"],"created_at":"2024-10-11T05:47:47.132Z","updated_at":"2026-05-18T05:32:48.379Z","avatar_url":"https://github.com/suhay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Webhooks Listener\n\n[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)\n\nA simple listener that will trigger custom scripts when it receives events from GitHub.\n\n## Usage\n\n```bash\n$ git clone git@github.com:suhay/github-webhooks-listener.git\n$ cd github-webhooks-listener\n$ python setup.py install --user\n```\n\n### .env file\n\n```\nAPI_TOKEN=YOUR_GITHUB_SECRET\n```\n\n### Repo configuration files\n\n```bash\n.\n├── README.md\n└── sites\n    └── my-site.json\n```\n\n```js\nmy-site.json\n\n{\n  \"path\": \"/home/code/my-site\", // path where repository lives\n  \"cwd\": \"/home/user\", // user path for nvm\n  \"node\": \"v12.7.0\", // nvm node version to use, if .nvmrc is no supplied\n  \"release\": {\n    \"build\": \"yarn \u0026\u0026 yarn build \u0026\u0026 tar -xvf {{release.sha}}.tar.gz\", // you may use handlebar notation to inject GitHub payload values into your steps\n    \"deploy\": \"rsync -av --delete public/ /var/www/html/my-site\",\n    \"cleanup\": \"rm -rf node_modules/ \u0026\u0026 rm -rf .cache/ \u0026\u0026 yarn cache clean\"\n  }\n}\n```\n\n### Adding listener to GitHub Webhooks\n\nAs of `v0.2.2` - Only the `release` event is supported.\n\n`https://{domain}/webhooks/{repo}`  \nor  \n`https://yoursite.com/webhooks/my-site`\n\nThe `repo` name must match the repository name (minus the user/org name) sent from GitHub and also the respective `.json` file that contains its custom scripts.\n\n### Deploying with Hypercorn\n\n```bash\n$ sudo nano /etc/systemd/system/github-webhooks-listener.service\n```\n\n```bash\n[Unit]\nDescription=GitHub Webhooks Listener\nAfter=network.target\nStartLimitIntervalSec=0\n\n[Service]\nType=simple\nRestart=always\nRestartSec=1\nUser=ubuntu\nExecStart=/home/ubuntu/.local/bin/hypercorn /mnt/projects/github-webhooks-listener/src/app --bind 127.0.0.1:5000\n\n[Install]\nWantedBy=multi-user.target\n```\n\nWithin your Apache2 `.conf`\n\n```bash\nProxyPass /webhooks http://localhost:5000/webhooks\nProxyPassReverse /webhooks https://localhost:5000/webhooks\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhay%2Fgithub-webhooks-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuhay%2Fgithub-webhooks-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhay%2Fgithub-webhooks-listener/lists"}