Giter VIP home page Giter VIP logo

git-pulls's Introduction

#git-pulls

If you find things that hub does not and you would like to see implemented, ping @AdrienGiboire for consideration.

Gem Version

Makes it easy to list and merge GitHub pull requests.

$ git pulls update
[fetches needed data for all pull requests]

$ git pulls list
Open Pull Requests for schacon/git-reference
19   10/26 0  Fix tag book link    ComputerDruid:fix-ta
18   10/21 0  Some typos fixing.   mashingan:master

$ git pulls list --reverse
Open Pull Requests for schacon/git-reference
18   10/21 0  Some typos fixing.   mashingan:master
19   10/26 0  Fix tag book link    ComputerDruid:fix-ta

$ git pulls checkout
Checking out all open pull requests for schacon/git-reference
> feature-request-1 into pull-feature-request-1
> feature/request2 into pull-feature/request2

$ git pulls show 1
> [summary]
> [diffstat]

$ git pulls show 1 --full
> [summary]
> [full diff]

$ git pulls browse 1
> go to web page (mac only)

$ git pulls merge 1
> merge pull request #1

##Requirements

git-pulls assumes you're using an 'origin' remote. If you are not, either add an 'origin' remote that points to the GitHub repository you want to check for pull requests, or set the name of your remote via an environment variable, GIT_REMOTE.

##Private repositories

To manage pull requests for your private repositories you have set up your git config for github

$ git config --global github.user your_gitubusername
$ git config --global github.token your_githubtoken123456789

You must generate your OAuth token for command line use, see how to generate oauth token.

##Using git-pulls with GitHub Enterprise

If you want to use the git-pulls script with a private GitHub install, set the github.host config value to your internal host.

$ git config --global github.host https://github.mycompany.com
$ git config --global github.api https://github.mycompany.com/api/v3

##Installation

Simply install it via Rubygems:

gem install git-pulls

(Prefix with sudo if necessary)

via Docker:

Use it as a container by building it first

docker build -t git-pulls .

And then launch the command like this :

docker run -v `pwd`:/app -v ~/.gitconfig:/root/.gitconfig --rm -it git-pulls list

##TESTING

To run the test suite use the following command :

bundle install
bundle exec rake test

git-pulls's People

Contributors

adriengiboire avatar amaltson avatar bsiegel avatar ckannan avatar codykrieger avatar cypher avatar djalal avatar dphiffer avatar grzegorzkazulak avatar mkhl avatar nixon avatar nono avatar ornicar avatar sandyarmstrong avatar schacon avatar sferik avatar sheax0r avatar todb avatar tommeier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-pulls's Issues

undefined method `[]' for nil:NilClass (NoMethodError)

  • OS-X: 10.8.5
  • ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
  • gem --version = 2.0.6
  • rvm = 1.22.13
  • git-pulls-0.4.11

Running git-pulls against a public repo on github that has no pull requests, it 'works' fine. Against a public repo with pull requests I receive the following (is it my configuration or ...?)

/Users/administrator/.rvm/gems/ruby-2.0.0-p247/gems/git-pulls-0.4.11/lib/git-pulls.rb:111:in show': undefined method[]' for nil:NilClass (NoMethodError)
from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/gems/git-pulls-0.4.11/lib/git-pulls.rb:32:in run' from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/gems/git-pulls-0.4.11/lib/git-pulls.rb:19:instart'
from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/gems/git-pulls-0.4.11/bin/git-pulls:6:in <top (required)>' from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/bin/git-pulls:23:inload'
from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/bin/git-pulls:23:in <main>' from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:ineval'
from /Users/administrator/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `

'

`merge': undefined method `[]' for nil:NilClass

This is with git-pulls-0.3.1

$ git pulls update  
Updating madrobby/dom-monster
Checking for forks in need of fetching
Open Pull Requests for madrobby/dom-monster
40   02/22 0  Sending data to ShowSlow            sergeychernyshev:mas
38   02/14 0  added fixes for Prototype and Scrip hij1nx:master       

$ git pulls merge 38
/Users/thomas/.rvm/gems/ruby-1.8.7-p302/gems/git-pulls-0.3.1/bin/../lib/git-pulls.rb:57:in `merge': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Users/thomas/.rvm/gems/ruby-1.8.7-p302/gems/git-pulls-0.3.1/bin/../lib/git-pulls.rb:27:in `send'
    from /Users/thomas/.rvm/gems/ruby-1.8.7-p302/gems/git-pulls-0.3.1/bin/../lib/git-pulls.rb:27:in `run'
    from /Users/thomas/.rvm/gems/ruby-1.8.7-p302/gems/git-pulls-0.3.1/bin/../lib/git-pulls.rb:16:in `start'
    from /Users/thomas/.rvm/gems/ruby-1.8.7-p302/gems/git-pulls-0.3.1/bin/git-pulls:6
    from /Users/thomas/.rvm/gems/ruby-1.8.7-p302/bin/git-pulls:19:in `load'
    from /Users/thomas/.rvm/gems/ruby-1.8.7-p302/bin/git-pulls:19

Please don't hardcode remotes' names

I spent one day trying to figure what was wrong with my install, as git-pulls kept crashing on me.
Browsing the source code, it finally became obvious: you assume the team's remote is named "origin".

git pulls --help does not work

Check it:

$ git pulls -x
No command: -x
Try: update, list, show, merge, browse
or call with '--help' for usage information
$ git pulls --help
No manual entry for git-pulls

Invalid deleted the source repository error

I am getting the following error

git-pulls merge 39
Sorry, opensourcehacker deleted the source repository, git-pulls doesn't support this.
You can manually patch your repo by running:

  curl https://github.com/opensourcehacker/sevabot/pull/39.patch | git am

Tell the contributor not to do this.

However I have not deleted any repository and there must be some kind of fault in the checking logic? I am trying to merge pull request from dev branch to master and both exist in the same repository.

Here is what happens if I run git am by hand:

curl https://github.com/opensourcehacker/sevabot/pull/39.patch | git am
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 92895  100 92895    0     0  57634      0  0:00:01  0:00:01 --:--:-- 60282
Applying: Working on stateful handlers
Applying: More stateful handler work-in-progress
Applying: Polished new stateful modules interface
error: patch failed: sevabot/frontend/main.py:70
error: sevabot/frontend/main.py: patch does not apply
Patch failed at 0003 Polished new stateful modules interface
The copy of the patch that failed is found in:
   /Users/mikko/code/sevabot/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Also looks like git-pulls checkout fails

git-pulls checkout 39
Checking out all open pull requests for opensourcehacker/sevabot
> dev into pull-dev
usage: git branch [options] [-r | -a] [--merged | --no-merged]
   or: git branch [options] [-l] [-f] <branchname> [<start-point>]
   or: git branch [options] [-r] (-d | -D) <branchname>...
   or: git branch [options] (-m | -M) [<oldbranch>] <newbranch>

Generic options
    -v, --verbose         show hash and subject, give twice for upstream branch
    -q, --quiet           suppress informational messages
    -t, --track           set up tracking mode (see git-pull(1))
    --set-upstream        change upstream info
    -u, --set-upstream-to <upstream>
                          change the upstream info
    --unset-upstream      Unset the upstream info
    --color[=<when>]      use colored output
    -r, --remotes         act on remote-tracking branches
    --contains <commit>   print only branches that contain the commit
    --abbrev[=<n>]        use <n> digits to display SHA-1s

Specific git-branch actions:
    -a, --all             list both remote-tracking and local branches
    -d, --delete          delete fully merged branch
    -D                    delete branch (even if not merged)
    -m, --move            move/rename a branch and its reflog
    -M                    move/rename a branch, even if target exists
    --list                list branch names
    -l, --create-reflog   create the branch's reflog
    --edit-description    edit the description for the branch
    -f, --force           force creation (when already exists)
    --no-merged <commit>  print only not merged branches
    --merged <commit>     print only merged branches
    --column[=<style>]    list branches in columns

Git version 1.8.1.3, OSX, Macports.

gem installation problem

Perhaps it's just me not knowing how to use gem install but I get this error:

    peterbe@macmix:~ $ sudo gem install git-pulls
    [sudo] password for peterbe: 
    Building native extensions.  This could take a while...
    ERROR:  Error installing git-pulls:
ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.8 extconf.rb
    extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1

    Gem files will remain installed in /var/lib/gems/1.8/gems/json-1.5.1 for inspection.
    Results logged to /var/lib/gems/1.8/gems/json-1.5.1/ext/json/ext/generator/gem_make.out

git-pulls.rb:301: syntax error, unexpected keyword_end, expecting $end

The gem has problems with my current installation:

/Users/bodo/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':     /Users/bodo/.rvm/gems/ruby-1.9.3-p0/gems/git-pulls-0.3.4/lib/git-pulls.rb:288: syntax error, unexpected ':', expecting keyword_then     or ';' or '\n' (SyntaxError)
/Users/bodo/.rvm/gems/ruby-1.9.3-p0/gems/git-pulls-0.3.4/lib/git-pulls.rb:301: syntax error, unexpected keyword_end, expecting   $end
from /Users/bodo/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/bodo/.rvm/gems/ruby-1.9.3-p0/gems/git-pulls-0.3.4/bin/git-pulls:4:in `<top (required)>'
from /Users/bodo/.rvm/gems/ruby-1.9.3-p0/bin/git-pulls:19:in `load'
from /Users/bodo/.rvm/gems/ruby-1.9.3-p0/bin/git-pulls:19:in `<main>'

Errors when trying to do git pulls update

Error after installation when trying to do git pulls update
at the local copy of d2s/dotfiles

Updating d2s/dotfiles
warning: peer certificate won't be verified in this SSL session
/Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:182:in `initialize': No such file or directory - .git/pulls_cache.json (Errno::ENOENT)
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:182:in `open'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:182:in `save_data'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:174:in `cache_pull_info'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:116:in `update'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:22:in `send'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:22:in `run'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:17:in `start'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/git-pulls:6
from /usr/bin/git-pulls:19:in `load'
from /usr/bin/git-pulls:19

Installed with:
sudo gem update

sudo gem install git-pulls
Fetching: crack-0.1.8.gem (100%)
Fetching: httparty-0.7.3.gem (100%)
When you HTTParty, you must party hard!
Fetching: git-pulls-0.1.0.gem (100%)
Successfully installed crack-0.1.8
Successfully installed httparty-0.7.3
Successfully installed git-pulls-0.1.0
3 gems installed

Operating System: OS X 10.6.6

Just updated git-pulls, has syntax error

Just updated git pulls, but got this error:

/Users/bodo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require':      /Users/bodo/.rvm/gems/ruby-1.9.2-p180/gems/git-pulls-0.3.4/lib/git-pulls.rb:288: syntax error, unexpected ':', expecting  keyword_then or ';' or '\n' (SyntaxError)
/Users/bodo/.rvm/gems/ruby-1.9.2-p180/gems/git-pulls-0.3.4/lib/git-pulls.rb:301: syntax error, unexpected keyword_end,  expecting $end
from /Users/bodo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from /Users/bodo/.rvm/gems/ruby-1.9.2-p180/gems/git-pulls-0.3.4/bin/git-pulls:4:in `<top (required)>'
from /Users/bodo/.rvm/gems/ruby-1.9.2-p180/bin/git-pulls:19:in `load'
from /Users/bodo/.rvm/gems/ruby-1.9.2-p180/bin/git-pulls:19:in `<main>'

is the build broken?

Undefined method 'gsub' for nil:NilClass

This occurs when merging, if the body of the pull request is empty. Trace:

/Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/gems/git-pulls-0.4.13/lib/git-pulls.rb:79:in merge': undefined methodgsub' for nil:NilClass (NoMethodError)
from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/gems/git-pulls-0.4.13/lib/git-pulls.rb:34:in run' from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/gems/git-pulls-0.4.13/lib/git-pulls.rb:21:instart'
from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/gems/git-pulls-0.4.13/bin/git-pulls:6:in <top (required)>' from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/bin/git-pulls:23:inload'
from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/bin/git-pulls:23:in <main>' from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:ineval'
from /Users/michael.shea/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `

'

Octokit bails with NoMethodError

Looks like you're using an older version of Octokit?

Using a public repo I have commit rights on, an an oauth token configured, I get this:

$ git pulls update
/home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit.rb:26:in `method_missing': undefined method `oauth_token=' for Octokit:Module (NoMethodError)
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-f984001d0804/lib/git-pulls.rb:257:in `block in configure'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit/configurable.rb:80:in `configure'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-f984001d0804/lib/git-pulls.rb:253:in `configure'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-f984001d0804/lib/git-pulls.rb:23:in `run'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-f984001d0804/lib/git-pulls.rb:19:in `start'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-f984001d0804/bin/git-pulls:6:in `<top (required)>'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/git-pulls:19:in `load'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/git-pulls:19:in `<main>'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/ruby_noexec_wrapper:14:in `<main>'
[ruby-1.9.3-p392@msf] (dev/git-pulls-gem) 
todb@mazikeen:~/git/rapid7/metasploit-framework

Patched that up to use access_token instead, per the docs: https://github.com/octokit/octokit.rb/blob/master/docs/authentication.md but then ran into a problem with serializer:

$ git pulls update
Updating todb-r7/metasploit-framework
/home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/serializer.rb:39:in `method': undefined method `dump' for class `Module' (NameError)
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/serializer.rb:39:in `initialize'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/serializer.rb:24:in `new'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/serializer.rb:24:in `multi_json'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/serializer.rb:7:in `any_json'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/agent.rb:16:in `serializer'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/sawyer-0.3.0/lib/sawyer/agent.rb:44:in `initialize'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit/client.rb:201:in `new'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit/client.rb:201:in `agent'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit/client.rb:240:in `request'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit/client.rb:123:in `get'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit/client/pull_requests.rb:19:in `pull_requests'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/gems/octokit-2.1.1/lib/octokit.rb:27:in `method_missing'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-2791dc136c6f/lib/git-pulls.rb:316:in `cache_pull_info'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-2791dc136c6f/lib/git-pulls.rb:196:in `update'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-2791dc136c6f/lib/git-pulls.rb:32:in `run'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-2791dc136c6f/lib/git-pulls.rb:19:in `start'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bundler/gems/git-pulls-2791dc136c6f/bin/git-pulls:6:in `<top (required)>'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/git-pulls:19:in `load'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/git-pulls:19:in `<main>'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/todb/.rvm/gems/ruby-1.9.3-p392@msf/bin/ruby_noexec_wrapper:14:in `<main>'
[ruby-1.9.3-p392@msf] (dev/git-pulls-gem) 
todb@mazikeen:~/git/rapid7/metasploit-framework

Fails in submodules

You have to parse the .git file to figure out where .git dir is.

/Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:250:in `initialize': Not a directory - .git/pulls_cache.json (Errno::ENOTDIR)
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:250:in `open'
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:250:in `save_data'
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:246:in `cache_pull_info'
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:151:in `update'
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:25:in `run'
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/../lib/git-pulls.rb:16:in `start'
    from /Users/sorin/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.4/bin/git-pulls:6
    from /Users/sorin/Library/Ruby/Gems/1.8/bin/git-pulls:19:in `load'
    from /Users/sorin/Library/Ruby/Gems/1.8/bin/git-pulls:19
Updating sorin-ionescu/oh-my-zsh

Ruby error on first git pulls update usage

First time user and usage. I should perhaps note that this repo is behind a organization and is not publically available.

Error:

$ git pulls update
Updating Fry-IT/lc
https://github.com/api/v2/json
warning: peer certificate won't be verified in this SSL session
Checking for forks in need of fetching
warning: peer certificate won't be verified in this SSL session
/var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/../lib/git-pulls.rb:154:in `fetch_stale_forks':  undefined     method `each' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/../lib/git-pulls.rb:141:in `update'
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/../lib/git-pulls.rb:28:in `send'
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/../lib/git-pulls.rb:28:in `run'
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/../lib/git-pulls.rb:18:in `start'
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/git-pulls:6
from /var/lib/gems/1.8/bin/git-pulls:19:in `load'
from /var/lib/gems/1.8/bin/git-pulls:19

Manual page

git-pulls has no manual page:

$ git pulls --help
No manual entry for git-pulls

gem_original_require error

Me again. I just managed to install it but now I get a different error:

    $ git pulls update
   /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load --  net/https (LoadError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/httparty-0.7.3/lib/httparty.rb:3
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/../lib/git-pulls.rb:3
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/git-pulls-0.2.1/bin/git-pulls:4
from /var/lib/gems/1.8/bin/git-pulls:19:in `load'
from /var/lib/gems/1.8/bin/git-pulls:19

In fact, I get the same error just running git pulls without any commands.

Possible to release a new version?

The latest released gem (0.3.4) has a fatal error in it. I had to clone this repo and build a new gem from master and it worked fine.

git-pulls list reporting "No such number"

Using jruby-1.5.6
Installed the gem
Successfully did a
git pulls update
on the git-pulls repo since it had a pending pull.
Then tried a
git pulls list
but I get:
"No such number"

My .git/pulls_cache.json file is attached.

A debugging guess makes me think there's a mismatch in that the pending patch's number is different from it's ordinal position in the list.

#5

Tries to talk to public GitHub even when project is on GitHub Enterprise

Trying to list pull requests on a repository cloned from GitHub Enterprise generates a 404 because it is making the request from the public github.com.

I haven't the foggiest idea which host is supposed to be used when GitHub Enterprise is being used, though.

$ git-pulls list
Updating acme/core
/Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/octokit-2.7.2/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/acme/core/pulls?state=open: 404 - Not Found // See: https://developer.github.com/v3 (Octokit::NotFound)
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/response.rb:9:in `block in call'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `get'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sawyer-0.5.5/lib/sawyer/agent.rb:94:in `call'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/octokit-2.7.2/lib/octokit/client.rb:257:in `request'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/octokit-2.7.2/lib/octokit/client.rb:194:in `paginate'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/octokit-2.7.2/lib/octokit/client/pull_requests.rb:20:in `pull_requests'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/octokit-2.7.2/lib/octokit.rb:27:in `method_missing'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:346:in `cache_pull_info'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:219:in `update'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:32:in `run'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:21:in `start'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/git-pulls-0.4.14/bin/git-pulls:6:in `<top (required)>'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/bin/git-pulls:22:in `load'
from /Users/tester/DevEnv/rbenv/versions/2.4.0/bin/git-pulls:22:in `<main>'

Add support for Github:FI

git-pulls looks very handy. I'd love to see support for custom Github:FI instances. This means the ability to change the URL in question, as well as set a user/API token for for the FI instance.

Issue with ruby 1.9.3p362

I have just installed the gem on my new mac, could be an error on my install or anyone having this issue with 1.9.3?

% git-pulls update
/Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:287:in `index': type mismatch: NilClass given (TypeError)
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:287:in `block in github_insteadof_matching'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:286:in `each'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:286:in `find'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:286:in `github_insteadof_matching'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:314:in `repo_info'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:13:in `initialize'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:18:in `new'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/lib/git-pulls.rb:18:in `start'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/git-pulls-0.3.8/bin/git-pulls:6:in `<top (required)>'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/bin/git-pulls:23:in `load'
    from /Users/netbe/.rbenv/versions/1.9.3-p362/bin/git-pulls:23:in `<main>'

Crash in `fetch_stale_forks` when forks have been deleted

Running git pulls update for homebrew results in backtrace (below).
Investigation shows that pull['head']['repository'] (in git-pulls.rb:149) is nil if the fork has since been deleted.

/Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:149:in fetch_stale_forks': undefined method[]' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:148:in each' from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:148:infetch_stale_forks'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:140:in update' from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:27:insend'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:27:in run' from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/../lib/git-pulls.rb:16:instart'
from /Library/Ruby/Gems/1.8/gems/git-pulls-0.3.0/bin/git-pulls:6
from /usr/bin/git-pulls:19:in `load'
from /usr/bin/git-pulls:19

git pulls list closed doesn't return any closed pull requests.

As the title says, I have a repo that has hundreds of closed pull requests (and there are some of them existing in the .json cache) and yet none of them show when I say git pulls list closed.

mark@Marks-MacBook-Air ~/foobar (master)$ git pulls list closed
Closed Pull Requests for foo/bar
 -- no closed pull requests --

Can anyone reproduce?

git-pulls lists error

Maybe something changed with their API? I'm not getting anything listed and getting this error.

$ git-pulls list
Updating mycompany/MyProject
Checking for forks in need of fetching
/Library/Ruby/Gems/2.0.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:229:in `fetch_stale_forks': undefined method `each' for false:FalseClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:220:in `update'
    from /Library/Ruby/Gems/2.0.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:32:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/git-pulls-0.4.14/lib/git-pulls.rb:21:in `start'
    from /Library/Ruby/Gems/2.0.0/gems/git-pulls-0.4.14/bin/git-pulls:6:in `<top (required)>'
    from /usr/local/bin/git-pulls:23:in `load'
    from /usr/local/bin/git-pulls:23:in `<main>'

Plans to create new commands (open and close)?

Does anyone have plans to extend this to have commands to open and close pull requests? If not, I'll send a PR.

To create a pull from the current branch:
git pull open -t <title> -d <description>

Would need to determine the target repo and branch name somehow.

Straight forward close:
git pull close <id>

git pulls update โ†’ undefined method `basic_auth`

$ git pulls update
Updating indirect/gist
/usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit/client/connection.rb:28:in `connection': undefined method `basic_auth' for # (NoMethodError)
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/connection.rb:36:in `initialize'
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/builder.rb:12:in `create'
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/builder.rb:59:in `build'
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/builder.rb:49:in `initialize'
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/builder.rb:12:in `new'
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/builder.rb:12:in `create'
        from /usr/local/Cellar/Gems/1.8/gems/faraday-0.6.0/lib/faraday/connection.rb:36:in `initialize'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit/client/connection.rb:19:in `new'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit/client/connection.rb:19:in `connection'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit/client/request.rb:23:in `request'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit/client/request.rb:5:in `get'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit/client/pulls.rb:15:in `pull_requests'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit.rb:17:in `send'
        from /usr/local/Cellar/Gems/1.8/gems/octokit-0.6.1/lib/octokit.rb:17:in `method_missing'
        from /usr/local/Cellar/Gems/1.8/gems/git-pulls-0.3.2/bin/../lib/git-pulls.rb:245:in `cache_pull_info'
        from /usr/local/Cellar/Gems/1.8/gems/git-pulls-0.3.2/bin/../lib/git-pulls.rb:151:in `update'
        from /usr/local/Cellar/Gems/1.8/gems/git-pulls-0.3.2/bin/../lib/git-pulls.rb:27:in `send'
        from /usr/local/Cellar/Gems/1.8/gems/git-pulls-0.3.2/bin/../lib/git-pulls.rb:27:in `run'
        from /usr/local/Cellar/Gems/1.8/gems/git-pulls-0.3.2/bin/../lib/git-pulls.rb:16:in `start'
        from /usr/local/Cellar/Gems/1.8/gems/git-pulls-0.3.2/bin/git-pulls:6
        from /usr/local/bin/git-pulls:19:in `load'
        from /usr/local/bin/git-pulls:19

Run "update" automatically on first request

I ran "git pulls list" and got an error:

$ git pulls list
Open Pull Requests for drnic/rubigen
/Library/Ruby/Gems/1.8/gems/git-pulls-0.1.0/bin/../lib/git-pulls.rb:178:in `read': No such file or directory - .git/pulls_cache.json (Errno::ENOENT)

Perhaps run the update command automatically if .git/pulls_cache.json is missing?

Gem has a upstream dependency error

gem install git-pulls
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: 
       octokit requires addressable (~> 2.2.4); 
       faraday requires addressable (~> 2.2.4); 
       launchy requires addressable (~> 2.3)

git pulls generates incorrect api URLs

Trying to use git pulls, and it looks like it isn't generated the proper API call. The project is missing.

    /Users/bryan/.rvm/gems/ree-1.8.7-2011.03@foomanchu/gems/octokit-0.5.2/lib/faraday/raise_error.rb:12:in `register_on_complete': GET https://github.com/api/v2/json/pulls//open: 401: {"error":"api route not recognized"} (Octokit::Unauthorized)

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.