All Projects → excaliburhan → node-gitlab-webhook

excaliburhan / node-gitlab-webhook

Licence: MIT license
Gitlab Webhooks handler based on Node.js. Support multiple handlers.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-gitlab-webhook

gitlab-ldap-group-sync
Manage your gitlab groups with ldap / active directory
Stars: ✭ 21 (-56.25%)
Mutual labels:  gitlab, gitlab-webhook
gitlab-page-server
A GitLab page server. Similar to the built-in page server, but with some additional features.
Stars: ✭ 12 (-75%)
Mutual labels:  gitlab, gitlab-webhook
shards-info
Source code of https://shards.info/
Stars: ✭ 32 (-33.33%)
Mutual labels:  gitlab
gitlab-merge
First Gitlab guided CLI to create your merge request from terminal
Stars: ✭ 46 (-4.17%)
Mutual labels:  gitlab
email
Aplus Framework Email Library
Stars: ✭ 127 (+164.58%)
Mutual labels:  gitlab
gitlab-registry-kubernetes-secrets-howto
How to use Gitlab Container Registry with Kubernetes.
Stars: ✭ 30 (-37.5%)
Mutual labels:  gitlab
lazy-reviewer
Google Chrome extension that adds the display of pull request diffs to global PR section on GitHub/GitLab.
Stars: ✭ 17 (-64.58%)
Mutual labels:  gitlab
autoload
Aplus Framework Autoload Library
Stars: ✭ 18 (-62.5%)
Mutual labels:  gitlab
gget
An easier way to find and automate file downloads from GitHub and GitLab repositories.
Stars: ✭ 30 (-37.5%)
Mutual labels:  gitlab
gitlab-docker-rancher-letsencrypt-setup
Automated private dev environment with docker, gitlab CI/CD...
Stars: ✭ 15 (-68.75%)
Mutual labels:  gitlab
Gigrator
Git repos migration tool which supports Github / Gitee / Gitlab / Gitea / Coding / Gogs / 腾讯工蜂.
Stars: ✭ 34 (-29.17%)
Mutual labels:  gitlab
k8s-knative-gitlab-harbor
Build container images with Knative + Gitlab + Harbor inside Kops cluster running on AWS
Stars: ✭ 23 (-52.08%)
Mutual labels:  gitlab
infraverse
Infrastructure Platforms and Applications Comparison
Stars: ✭ 77 (+60.42%)
Mutual labels:  gitlab
github-wc-polyfill
Ensure that all GitHub and GitLab scripts required for UXP and SeaMonkey are loaded correctly
Stars: ✭ 87 (+81.25%)
Mutual labels:  gitlab
hej
Hej! is a simple authentication boilerplate for Socialite.
Stars: ✭ 111 (+131.25%)
Mutual labels:  gitlab
godot-ci
Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Stars: ✭ 316 (+558.33%)
Mutual labels:  gitlab
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (+22.92%)
Mutual labels:  gitlab
gitlab to gitea
Gitlab to Gitea migration script.
Stars: ✭ 54 (+12.5%)
Mutual labels:  gitlab
humhub-oauth
Social OAuths built for the Social Platform HumHub
Stars: ✭ 16 (-66.67%)
Mutual labels:  gitlab
mypaas
MyPaas is an Ansible playbook for startups or small companies which want to build a modern and fully automated infrastructure.
Stars: ✭ 24 (-50%)
Mutual labels:  gitlab

node-gitlab-webhook

Gitlab Webhooks handler based on Node.js. Support multiple handlers.

Language

Instructions

This library is modified for Gitlab, Github version here: node-github-webhook.

If you want to know the settings of Gitlab webhooks, please see: gitlab webhooks.

Installation

npm install node-gitlab-webhook --save

Usage

var http = require('http')
var createHandler = require('node-gitlab-webhook')
var handler = createHandler([ // multiple handlers
  { path: '/webhook1', secret: 'secret1' },
  { path: '/webhook2', secret: 'secret2' }
])
// var handler = createHandler({ path: '/webhook1', secret: 'secret1' }) // single handler

http.createServer(function (req, res) {
  handler(req, res, function (err) {
    res.statusCode = 404
    res.end('no such location')
  })
}).listen(7777)

handler.on('error', function (err) {
  console.error('Error:', err.message)
})

handler.on('push', function (event) {
  console.log(
    'Received a push event for %s to %s',
    event.payload.repository.name,
    event.payload.ref
  )
  switch (event.path) {
    case '/webhook1':
      // do sth about webhook1
      break
    case '/webhook2':
      // do sth about webhook2
      break
    default:
      // do sth else or nothing
      break
  }
})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].