Git Product home page Git Product logo

node-gitlab-hook's Introduction

Hi there, I'm Jamie ๐Ÿ‘‹

  • ๐Ÿ”ญ I'm the Operations Lead for the Open Source Program Office at Citi
  • โœ๏ธ I'm the lead maintainer of Git Proxy - a library for deploying custom push protections and policies on top of Git
  • ๐ŸŽฉ I'm the co-founder of huntr.dev (recently acquired by ProtectAI)
  • ๐Ÿ’ฌ Ask me about open source software, entrepreneurship, and artificial intelligence
  • ๐Ÿ“ซ Reach me on Twitter or LinkedIn
  • โšก Fun fact: I co-authored a paper on autonomous vehicles

node-gitlab-hook's People

Contributors

huntr-helper avatar luicfer avatar rolfn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-gitlab-hook's Issues

TypeError: Cannot read property 'remoteAddress' of undefined

I'm running this on Windows using iisnode (https://github.com/tjanczuk/iisnode)

var gitlabhook = require('gitlabhook');
var gitlab = gitlabhook({ host: 'localhost', port: process.env.PORT}, function(){
    console.log('Webhook received');
});

gitlab.listen();

This is the error log when the Gitlab webhook hits my endpoint:

Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read property 'remoteAddress' of undefined
    at serverHandler (C:\Program Files\iisnode\www\express\node_modules\gitlabhook\gitlabhook.js:175:22)
    at Server.emit (events.js:110:17)
    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:491:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
    at Socket.socketOnData (_http_server.js:343:22)
    at Socket.emit (events.js:107:17)
    at readableAddChunk (_stream_readable.js:163:16)
    at Socket.Readable.push (_stream_readable.js:126:10)
    at Pipe.onread (net.js:538:20)

Am I supposed to be using this in conjunction with Express?

A brief set up instruction

Can somebody explain, how can I set it up on my server?

How can I specify commands to execute on webhook firing? I need smth like this:

git pull
npm install
bower install
grunt build

Can you please write a brief instruction of how to achieve it?

Thanks in advance.

runtime error

I start the server with pm2
it will crash sometime.
pm2 list show status is errored
I check the err-log. it's like this.

/root/test-webhook/node_modules/gitlabhook/gitlabhook.js:113
    '%i': lastCommit.id,
                    ^
TypeError: Cannot read property 'id' of undefined

Run Tasks only for specific Branch

Hey there!

Is it possible to say:
"Only when the master branch got changed, do the scripts."?

Because now it always does the scripts but I only want it when the master branch got updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.