Skip to content

How about getting GitHub username with GitHub API ? #5

@sotayamashita

Description

@sotayamashita

Like yeoman/generator-generator/app/index.js.

var GitHubApi = require('github');

github.user.getFrom({
    user: name
  }, function (err, res) {
    if (err) {
      log.error('Cannot fetch your github profile. Make sure you\'ve typed it correctly.');
      res = emptyGithubRes;
    }

    cb(JSON.parse(JSON.stringify(res)));
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions