Giter Club home page Giter Club logo

fue's Introduction

Fue

Gem Version Tests

Find e-mail addresses of a Github users from their commit logs.

Fue is short for "Finding Unicorn Engineers".

Table of Contents

Usage

gem install fue

Commands

Find Someone's Email

The find command looks through user's initial repository commits.

$ fue --verbose find defunkt

Chris Wanstrath <[email protected]>
Chris Wanstrath <[email protected]>

Find All Repo Contributors' Emails

The contributors command looks through a git log of contributors, then fetches their e-mails.

$ fue --verbose contributors defunkt/colored

defunkt: Chris Wanstrath <[email protected]>
kch: Caio Chassot <[email protected]>

Options

Specify More Depth

By default the code looks at 1 commit from the last 10 repositories. You can look at more repositories (breadth) and more commits (depth). The maximum value for depth is 100, enforced by Github. Fue will iterate over a number of repositories larger than 100.

$ fue find --breadth=100 --depth=5 defunkt

Chris Wanstrath <[email protected]>
Chris Wanstrath <[email protected]>
defunkt <[email protected]>

Get Help

fue help

Displays additional options.

Access Tokens

Fue will ask you to create a personal access token and will store it in the keychain. The access token should be created with public_repo scope here. You can also skip the prompts and use a previously obtained token with -t or by setting the GITHUB_ACCESS_TOKEN environment variable.

See Creating a Personal Access Token for the Command Line for more information about personal tokens.

Debugging

If you run into an unexpected error, try getting a stack trace with GLI_DEBUG=true.

$ GLI_DEBUG=true fue find dblock

FrozenError: can't modify frozen String
  /Users/dblock/source/dblock/fue/lib/fue/auth.rb:97:in `get_secure'
  /Users/dblock/source/dblock/fue/lib/fue/auth.rb:80:in `get_password'
  /Users/dblock/source/dblock/fue/lib/fue/auth.rb:50:in `password'
  /Users/dblock/source/dblock/fue/lib/fue/auth.rb:59:in `block in github'

Contributing

There are a few feature requests and known issues. Please contribute! See CONTRIBUTING.

Copyright and License

Copyright (c) 2018-2022, Daniel Doubrovkine, Artsy, with help from Orta.

This project is licensed under the MIT License.

fue's People

Contributors

dblock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

arlindnocaj

fue's Issues

fue find lundefugl

Check why we're not finding anything for fue find lundefugl, there's a commit or two.

error: can't modify frozen String

osx ~/source/dblock/lost-robbies (master)$ fue find kanew071
Enter GitHub username: dblock
Enter dblock's GitHub password (never stored): *error: can't modify frozen String

Support saving credentials on Linux

What happens to auth on Linux. Don't have a linux box to track this down, but I am going to imagine that prompting for credentials works, but saving them does not.

Display name/email stats

Related to #8, show stats such as how many commits we saw with a given email, when it was first/last used, etc.

Windows doesn't know how to execute 'fue'

On Windows, 'bundle exec rake' fails with:

2) Fue find default displays version
     Failure/Error: stdout, stderr, status = Open3.capture3(*cmd)

     Errno::ENOEXEC:
       Exec format error - D:/fue/bin/fue
     # ./lib/fue/shell.rb:5:in `system!'
     # ./spec/fue/fue_spec.rb:8:in `block (4 levels) in <top (required)>'
     # ./spec/fue/fue_spec.rb:14:in `block (4 levels) in <top (required)>'

Token caching/GitHub authentication dependent on Mac keychain

The current setup for creating and storing a token, or depending on one existing in the keychain, doesn't work cross-platform. If we skip the keychain checks, github_token doesn't work if a token already exists.

The convenience for Mac users is nice, but is there a way we can find an abstraction for cross-platform keychains, or some other alternative? Not being able to create a token when one exists also makes this difficult. Also, all of the current tests passed despite this critical issue.

Maybe we can scale back to manual token authentication, write more rigorous tests, and make things less platform-dependent?

Personal suggestion for simplifying password input:

def get_secure
  require 'highline'
  cli = HighLine.new
  input = cli.ask("Enter #{username}'s GitHub password (never stored):" { |q| q.echo = false } # alt. q.echo = "*"
  input
end

Cutting out the dependence on stty

Eager to hear your thoughts!

fue_spec fails on Windows when path includes a space

Falsely states that the file doesn't exist, when run from a path with a space. Test passes when run from a path without a space, eg. 'D:\fue"

Failures:

  1) Fue find default displays help
     Failure/Error: stdout, stderr, status = Open3.capture3(*cmd)

     Errno::ENOENT:
       No such file or directory - C:/Users/Zack Layton/Documents/Projects/fue/bin/fue
     # ./lib/fue/shell.rb:5:in `system!'
     # ./spec/fue/fue_spec.rb:8:in `block (4 levels) in <top (required)>'
     # ./spec/fue/fue_spec.rb:11:in `block (4 levels) in <top (required)>'

  2) Fue find default displays version
     Failure/Error: stdout, stderr, status = Open3.capture3(*cmd)

     Errno::ENOENT:
       No such file or directory - C:/Users/Zack Layton/Documents/Projects/fue/bin/fue
     # ./lib/fue/shell.rb:5:in `system!'
     # ./spec/fue/fue_spec.rb:8:in `block (4 levels) in <top (required)>'
     # ./spec/fue/fue_spec.rb:14:in `block (4 levels) in <top (required)>'

  3) Fue find help displays help
     Failure/Error: stdout, stderr, status = Open3.capture3(*cmd)

     Errno::ENOENT:
       No such file or directory - C:/Users/Zack Layton/Documents/Projects/fue/bin/fue help
     # ./lib/fue/shell.rb:5:in `system!'
     # ./spec/fue/fue_spec.rb:19:in `block (4 levels) in <top (required)>'
     # ./spec/fue/fue_spec.rb:22:in `block (4 levels) in <top (required)>'

Github returns 401 on authorizations

Did an API get deprecated?

$ fue find dblock
Resolving dependencies...
Enter dblock's GitHub password (never stored): ******
error: POST https://api.github.com/authorizations: 404 - Not Found
See: https://docs.github.com/rest

Workaround is to use a token with -t.

Gem build complains "open-ended dependency"

D:\fue>gem build fue
WARNING:  open-ended dependency on github_api (>= 0) is not recommended
  if github_api is semantically versioned, use:
    add_runtime_dependency 'github_api', '~> 0'
WARNING:  open-ended dependency on gli (>= 0) is not recommended
  if gli is semantically versioned, use:
    add_runtime_dependency 'gli', '~> 0'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: fue
  Version: 0.2.2
  File: fue-0.2.2.gem

fue exitstatus tests don't work on Windows

Fue::Shell#system! tests fail on Windows because 'echo' prints the entire line. Eg output:
*nix => OK
Windows => OK ; exit 0

Failures:

  1) Fue::Shell#system! returns a zero error code
     Failure/Error: expect(Fue::Shell.system!('echo OK ; exit 0')).to eq 'OK'

       expected: "OK"
            got: "OK ; exit 0"

       (compared using ==)
     # ./spec/fue/shell_spec.rb:6:in `block (3 levels) in <top (required)>'

  2) Fue::Shell#system! returns a non zero error code
     Failure/Error:
       expect do
         Fue::Shell.system!('echo OK ; exit 1')
       end.to raise_error RuntimeError, /exit code pid \d* exit 1/

       expected RuntimeError with message matching /exit code pid \d* exit 1/ but nothing was raised
     # ./spec/fue/shell_spec.rb:9:in `block (3 levels) in <top (required)>'

Add more verbose output

Add a lot more detail with --verbose.

For example how many repos have been retrieved, what queries are being made, how many commits are being checked, credentials being loaded and from where, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.