Skip to content

Commit 3fd1f01

Browse files
committed
Merge pull request #3 from vsviridov/master
Added global hooks
2 parents 3e883f1 + b105bd1 commit 3fd1f01

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

lib/gitlab.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var Milestone = require('./milestone');
1717
var Project = require('./project');
1818
var Member = require('./member');
1919
var Hook = require('./hook');
20+
var GlobalHook = require('./globalHook.js');
2021
var Issue = require('./issue');
2122
var User = require('./user');
2223
var Repository = require('./repository');
@@ -39,6 +40,7 @@ function Gitlab(options) {
3940
this.milestones = new Milestone(this);
4041
this.members = new Member(this);
4142
this.hooks = new Hook(this);
43+
this.globalHooks = new GlobalHook(this);
4244
this.issues = new Issue(this);
4345
this.users = new User(this);
4446
this.merge_requests = new MergeRequest(this);

lib/globalHook.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*!
2+
* gitlab - lib/globalHook.js
3+
* Copyright(c) 2013 fengmk2 <[email protected]>
4+
* Copyright(c) 2014 vsviridov <[email protected]>
5+
* MIT Licensed
6+
*/
7+
8+
"use strict";
9+
10+
/**
11+
* Module dependencies.
12+
*/
13+
14+
var util = require('util');
15+
var restful = require('restful-client');
16+
17+
function GlobalHook(client) {
18+
this.constructor.super_.call(this, client, '/hooks', 'hook_id');
19+
}
20+
util.inherits(GlobalHook, restful.RESTFulResource);
21+
22+
module.exports = GlobalHook;

0 commit comments

Comments
 (0)