git-pulls 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/git-pulls.rb +3 -13
  2. metadata +4 -4
@@ -146,6 +146,7 @@ Usage: git pulls update
146
146
  pulls = get_pull_info
147
147
  repos = {}
148
148
  pulls.each do |pull|
149
+ next if pull['head']['repository'].nil? # Fork has been deleted
149
150
  o = pull['head']['repository']['owner']
150
151
  r = pull['head']['repository']['name']
151
152
  s = pull['head']['sha']
@@ -156,18 +157,7 @@ Usage: git pulls update
156
157
  end
157
158
  repos.each do |repo, bool|
158
159
  puts " fetching #{repo}"
159
- git("fetch #{protocol(get_repo_visibility)}#{github_url}/#{repo}.git +refs/heads/*:refs/pr/#{repo}/*")
160
- end
161
- end
162
-
163
- def protocol(is_private)
164
- is_private ? "ssh://git@" : "git://"
165
- end
166
-
167
- def get_repo_visibility
168
- # This would fail if the repository was private and user did not provide github token
169
- if github_credentials_provided?
170
- Octokit.repository("#{repo_info[0]}/#{repo_info[1]}").private
160
+ git("fetch #{github_endpoint}/#{repo}.git +refs/heads/*:refs/pr/#{repo}/*")
171
161
  end
172
162
  end
173
163
 
@@ -218,7 +208,7 @@ Usage: git pulls update
218
208
  if host.size > 0
219
209
  host
220
210
  else
221
- 'https://github.com/'
211
+ 'https://github.com'
222
212
  end
223
213
  end
224
214
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-pulls
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Chacon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-16 00:00:00 -05:00
18
+ date: 2011-02-25 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency