git-pulls 0.3.1 → 0.3.2

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 +14 -2
  2. metadata +4 -4
data/lib/git-pulls.rb CHANGED
@@ -54,8 +54,20 @@ Usage: git pulls update
54
54
  num = @args.shift
55
55
  option = @args.shift
56
56
  if p = pull_num(num)
57
- o = p['head']['repository']['owner']
58
- r = p['head']['repository']['name']
57
+ if p['head']['repository']
58
+ o = p['head']['repository']['owner']
59
+ r = p['head']['repository']['name']
60
+ else # they deleted the source repo
61
+ o = p['head']['user']['login']
62
+ purl = p['patch_url']
63
+ puts "Sorry, #{o} deleted the source repository, git-pulls doesn't support this."
64
+ puts "You can manually patch your repo by running:"
65
+ puts
66
+ puts " curl #{purl} | git am"
67
+ puts
68
+ puts "Tell the contributor not to do this."
69
+ return false
70
+ end
59
71
  s = p['head']['sha']
60
72
 
61
73
  message = "Merge pull request ##{num} from #{o}/#{r}\n\n---\n\n"
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: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
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-25 00:00:00 -08:00
18
+ date: 2011-03-17 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency