Skip to content

Commit 4d40d4f

Browse files
author
Joe Gallo
committed
add add-collaborator example
1 parent 4624343 commit 4d40d4f

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

examples/addCollaborator.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"use strict";
2+
3+
var Client = require("./../lib/index");
4+
var testAuth = require("./../testAuth.json");
5+
6+
var github = new Client({
7+
debug: true
8+
});
9+
10+
github.authenticate({
11+
type: "oauth",
12+
token: testAuth["token"]
13+
});
14+
15+
github.repos.addCollaborator({
16+
user: "brassafrax", // needs to be an org
17+
repo: "test",
18+
collabuser: "first9890"
19+
}, function(err, res) {
20+
console.log(err, res);
21+
});

0 commit comments

Comments
 (0)