Daniel Doubrovkine bio photo

Daniel Doubrovkine

aka dB., @awscloud, former CTO @artsy, +@vestris, NYC

Email Twitter LinkedIn Github Strava
Creative Commons License

If you are like me, trying to hire developers, you’ve long mastered the dark art of digging up their e-mail address from social media, LinkedIn and, most importantly, Github for the purposes of reaching out directly. The latter consists of finding an old source repo and running a git log on it. Most Github users have used a real e-mail address when making their first commits with git. Privacy be damned.

Fue

Introducing fue, a little command-line tool to do just that. Get a Github access token here. Fue is short for “Finding Unicorn Engineers”.

Implementation Details

The Github V4 GraphQL API lets you make one deep query without having to iterate over repositories or commits.

Finding a User ID

A first query gets us the user ID.

query($login: String!) {
  user(login: $login) {
    id
  }
}

Enumerating Root Repositories

The second query gets us all root repositories with their commit histories for the user ID obtained above.

query($login: String!, $author_id: ID!, $depth: Int!) {
  user(login: $login) {
    repositories(last: $depth, isFork:false, privacy: PUBLIC) {
      edges {
        node {
          defaultBranchRef {
            target {
              ... on Commit {
                history(first: 1, author: { id: $author_id }) {
                  nodes {
                    author {
                      email
                      name
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

There’s no API to retrieve a user by ID or to retrieve commits for a login, so this may seem a bit cumbersome.

Open-Source

Fue is open-source, please contribute to it.