Skip to content

Instantly share code, notes, and snippets.

@billybonks
Created March 11, 2017 15:09
Show Gist options
  • Save billybonks/34144e6a2507b1110f9a46d6bfba5807 to your computer and use it in GitHub Desktop.
Save billybonks/34144e6a2507b1110f9a46d6bfba5807 to your computer and use it in GitHub Desktop.
async install(repo){
this.github = await User.githubClient(this.user.id);
repo = await this.saveRepo(repo);
await this.savePullRequests(repo);
await this.ensureInstallerIsMember(repo);
return this.saveLabels(repo);
}
install(repo){
return User.getGithubTokens(this.user.id).then( (tokens) => {
this.github = new Github(tokens.access_token);
return this.saveRepo(repo)
.then(this.addMember.bind(this))
.then(this.savePullRequests.bind(this))
.then(this.saveLabels.bind(this))
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment