gethubemail

1.0.2 • Public • Published

Find Github user emails

https://www.npmjs.com/package/gethubemail

This is a simple node.js module that scans email addresses in commits and takes a guess as to what might be the user's main email.

It's based on FindGitHubEmail by @alpacaaa. As noted there, it makes it easy to get in contact with open source developers. Please use it for good, not evil.

Install

npm install gethubemail

Usage

var gethubemail = require("gethubemail");

// optional, set auth info to promote Request Rate Limit
// https://stackoverflow.com/questions/13394077/is-there-a-way-to-increase-the-api-rate-limit-or-to-bypass-it-altogether-for-git
gethubemail.auth = {
  username: YOUR_GITHUB_USERNAME,
  password: YOUR_GITHUB_PERSONAL_TOKEN,
};
var username = "alpacaaa";

gethubemail.find(username).then(function (result) {
  console.log(result);
});

// {
//   best_guess: 'babbonatale@alpacaaa.net',
//   gravatar_match: true,
//   alternatives: []
// }

Command line usage

You can install this module globally with the -g flag and use it from the command line.

gethubemail alpacaaa

Or set the GITHUB_BASIC_AUTH with username and personal access token -

GITHUB_BASIC_AUTH=hailiang-wang:ghp_1Qu2Cxxx bin/cli.js alpacaaa

Testing

npm test

License

Apache2.0

Readme

Keywords

none

Package Sidebar

Install

npm i gethubemail

Weekly Downloads

0

Version

1.0.2

License

Apache2.0

Unpacked Size

9.35 kB

Total Files

7

Last publish

Collaborators

  • chatopera