Code Monkey home page Code Monkey logo

node-gitlab-webhook's People

Contributors

excaliburhan avatar gopenguin avatar joerobich 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

Watchers

 avatar

node-gitlab-webhook's Issues

Missing issue hook in the Typescript definition file

In your Typescript definition file your are exposing the available hooks right here:

export interface GitLabHooks {
on(type: 'push', callback: (event: EventData<PushEvent>) => void): void;
on(type: 'tag_push', callback: (event: EventData<TagPushEvent>) => void): void;
on(type: 'note', callback: (event: EventData<NoteEvent>) => void): void;
on(type: 'merge_request', callback: (event: EventData<MergeRequestEvent>) => void): void;
on(type: 'wiki_page', callback: (event: EventData<WikiPageEvent>) => void): void;
on(type: 'pipeline', callback: (event: EventData<PipelineEvent>) => void): void;
on(type: 'build', callback: (event: EventData<BuildEvent>) => void): void;
on(type: 'error', callback: (err: Error) => void): void;
}

Unfortunately though you are missing out on one:

on(type: 'issue', callback: (event: EventData<IssueEvent>) => void): void;

Currently I am not able to create a pull request, so I'd appreciate it if you can do this yourself.

Security issue

I'm a member of the Node.js Foundation Security Working Group and we received a report of a vulnerability in this module.

We tried inviting the author by e-mail but received no response so I'm opening this issue and inviting anyone with commit and npm publish rights to collaborate with us on a fix.

Project id in payload and project object typing issue

In my handler for incoming issues I noticed that event.payload.project.id is typed as id?: number | undefined (line 354):

export interface Project {
name: string;
description: string;
web_url: string;
avatar_url: string;
git_ssh_url: string;
git_http_url: string;
namespace: string;
visibility_level: number;
path_with_namespace: string;
default_branch: string;
homepage: string;
url: string;
ssh_url: string;
http_url: string;
id?: number;
}

However event.payload.object_attributes.project_id (line 63) is not optional:

export interface IssueAttributes {
id: number;
title: string;
assignee_ids: number[];
assignee_id: number;
author_id: number;
project_id: number;
created_at: string;
updated_at: string;
position: number;
branch_name: string;
description: string;
milestone_id: number;
state: string;
iid: number;
url: string;
action: string;
}

Is that a mistake in your typings or is it actually possible that Gitlab will return undefined for the first id while project_id is not?

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.