Skip to content

Instantly share code, notes, and snippets.

@masonforest
Created February 10, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masonforest/59cdf9dd79ee28c64e3b to your computer and use it in GitHub Desktop.
Save masonforest/59cdf9dd79ee28c64e3b to your computer and use it in GitHub Desktop.
Node-github add team membership example
var GitHubApi = require("github");
var teamId = "<your user id>";
var token = "<your token>";
var username = "<username>";
var github = new GitHubApi({version: "3.0.0"});
github.authenticate({
type: "oauth",
token: token
});
github.orgs.addTeamMembership({id: teamId, user: username}, function(error,info){
if(error){
console.log(error);
} else {
console.log(info);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment