{"id":13835290,"url":"https://github.com/excaliburhan/node-gitlab-webhook","last_synced_at":"2025-04-30T16:47:40.948Z","repository":{"id":65424659,"uuid":"79690186","full_name":"excaliburhan/node-gitlab-webhook","owner":"excaliburhan","description":"Gitlab Webhooks handler based on Node.js. Support multiple handlers.","archived":false,"fork":false,"pushed_at":"2019-04-01T03:34:18.000Z","size":11,"stargazers_count":54,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T06:17:16.660Z","etag":null,"topics":["gitlab","gitlab-webhook","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/excaliburhan.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":"2017-01-22T03:16:08.000Z","updated_at":"2024-05-27T04:28:54.000Z","dependencies_parsed_at":"2023-01-23T10:55:21.744Z","dependency_job_id":null,"html_url":"https://github.com/excaliburhan/node-gitlab-webhook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fnode-gitlab-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fnode-gitlab-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fnode-gitlab-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fnode-gitlab-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excaliburhan","download_url":"https://codeload.github.com/excaliburhan/node-gitlab-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251747851,"owners_count":21637406,"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":["gitlab","gitlab-webhook","nodejs"],"created_at":"2024-08-04T14:00:59.041Z","updated_at":"2025-04-30T16:47:40.924Z","avatar_url":"https://github.com/excaliburhan.png","language":"JavaScript","readme":"# node-gitlab-webhook\nGitlab Webhooks handler based on Node.js. Support multiple handlers.\n\n## Language\n\n- [中文](https://github.com/excaliburhan/node-gitlab-webhook/blob/master/docs/zh_CN.md)\n\n## Instructions\n\nThis library is modified for Gitlab, Github version here: [node-github-webhook](https://github.com/excaliburhan/node-github-webhook).\n\nIf you want to know the settings of Gitlab webhooks, please see: [gitlab webhooks](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html).\n\n## Installation\n\n`npm install node-gitlab-webhook --save`\n\n## Usage\n\n```js\nvar http = require('http')\nvar createHandler = require('node-gitlab-webhook')\nvar handler = createHandler([ // multiple handlers\n  { path: '/webhook1', secret: 'secret1' },\n  { path: '/webhook2', secret: 'secret2' }\n])\n// var handler = createHandler({ path: '/webhook1', secret: 'secret1' }) // single handler\n\nhttp.createServer(function (req, res) {\n  handler(req, res, function (err) {\n    res.statusCode = 404\n    res.end('no such location')\n  })\n}).listen(7777)\n\nhandler.on('error', function (err) {\n  console.error('Error:', err.message)\n})\n\nhandler.on('push', function (event) {\n  console.log(\n    'Received a push event for %s to %s',\n    event.payload.repository.name,\n    event.payload.ref\n  )\n  switch (event.path) {\n    case '/webhook1':\n      // do sth about webhook1\n      break\n    case '/webhook2':\n      // do sth about webhook2\n      break\n    default:\n      // do sth else or nothing\n      break\n  }\n})\n```\n","funding_links":[],"categories":["目录"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcaliburhan%2Fnode-gitlab-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcaliburhan%2Fnode-gitlab-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcaliburhan%2Fnode-gitlab-webhook/lists"}