{"id":15480439,"url":"https://github.com/andycall/webhook-server","last_synced_at":"2025-03-28T14:29:50.819Z","repository":{"id":25936637,"uuid":"29378047","full_name":"andycall/webhook-server","owner":"andycall","description":"Github WebHook 自动化部署工具","archived":false,"fork":false,"pushed_at":"2015-01-21T11:26:44.000Z","size":383,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-10T22:58:47.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andycall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-17T03:08:53.000Z","updated_at":"2016-07-02T10:47:57.000Z","dependencies_parsed_at":"2022-08-03T02:30:16.146Z","dependency_job_id":null,"html_url":"https://github.com/andycall/webhook-server","commit_stats":null,"previous_names":["andycall/webhook"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fwebhook-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fwebhook-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fwebhook-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fwebhook-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andycall","download_url":"https://codeload.github.com/andycall/webhook-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246045574,"owners_count":20714798,"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":[],"created_at":"2024-10-02T04:42:09.576Z","updated_at":"2025-03-28T14:29:50.774Z","avatar_url":"https://github.com/andycall.png","language":"JavaScript","readme":"Github 自动项目更新工具\n====================\n\n\n## Usage (单一用作Github自动更新工具)\n\n则运行\n```\nnpm install webhook-server --save-dev\n```\n\n```\nscreen\n```\n\n```\ncd node_modules/webhook-server\n```\n\n\n```\nnpm start\n```\n\n然后关掉ssh远程命令行。\n\n\n如果是想在Linux上长期挂着的话， 可以使用screen命令\n\n具体内容就百度搜吧。 很容易的→_→\n\n更新的所有细节都会写入到项目目录下的log文件夹内。\n\n## 作为Node 中间件\n\n内置的hander.js 可以作为处理Webhook的中间件， 它暴露于一个接口， 同时也需要传进一个参数\n\n    var createHandler = require('./hander');\n    var handler = createHandler({ path : \"/webhook\" , 'secret' : \"Enter your secret key here\"});\n\n## API\n\n+ ***path*** : 为Github上发送的地址的路由，若设置为`webhook`, 即地址为`http://example.com/webhook`\n+ ***secret*** : 为Github上设置的安全秘钥， 如果出现错误， 则会返回ERROR\n\n返回的handler 为一个函数， 它接受request, response, callback 三个参数。\n提供一个简单的例子：\n\n    http.createServer(function(request, response){\n        handler(request, response, function(err){\n            res.statusCode = 404;\n            res.end(\"ERROR\");\n        });\n    }).listen(4000);\n\n回调函数为发生错误的时候触发。\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandycall%2Fwebhook-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandycall%2Fwebhook-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandycall%2Fwebhook-server/lists"}