ghtorrent 0.7.3 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ require 'sequel'
2
+
3
+ require 'ghtorrent/migrations/mysql_defaults'
4
+
5
+ Sequel.migration do
6
+ up do
7
+ puts "Fixing table issue_labels"
8
+
9
+ alter_table :issue_labels do
10
+ drop_column :repo_id
11
+ drop_column :ext_ref_id
12
+ add_foreign_key :issue_id, :issues
13
+ add_primary_key ([:issue_id, :label_id])
14
+ end
15
+ end
16
+
17
+ down do
18
+ alter_table :issue_labels do
19
+ drop_constraint :primary_key
20
+ drop_column :issue_id
21
+ add_foreign_key :repo_id, :projects
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,22 @@
1
+ require 'sequel'
2
+
3
+ require 'ghtorrent/migrations/mysql_defaults'
4
+
5
+ Sequel.migration do
6
+ up do
7
+ puts "Adding column user_id to table pull_rq"
8
+
9
+ alter_table :pull_request_history do
10
+ add_foreign_key :actor_id, :user
11
+ end
12
+
13
+ puts 'Remember to run the fixes/update_pull_request_history_actor.rb
14
+ script to mark deleted projects'
15
+ end
16
+
17
+ down do
18
+ alter_table :pull_request_history do
19
+ drop_column :actor_id
20
+ end
21
+ end
22
+ end
@@ -368,7 +368,7 @@ module GHTorrent
368
368
  retrieved_comments.each { |x|
369
369
  x['owner'] = owner
370
370
  x['repo'] = repo
371
- x['issue_id'] = pullreq_id
371
+ x['pullreq_id'] = pullreq_id.to_i
372
372
 
373
373
  if persister.find(:pull_request_comments, {'owner' => owner,
374
374
  'repo' => repo,
@@ -397,7 +397,7 @@ module GHTorrent
397
397
 
398
398
  r['repo'] = repo
399
399
  r['owner'] = owner
400
- r['pullreq_id'] = pullreq_id
400
+ r['pullreq_id'] = pullreq_id.to_i
401
401
  persister.store(:pull_request_comments, r)
402
402
  info "Retriever: Added pullreq comment #{owner}/#{repo} #{pullreq_id}->#{comment_id}"
403
403
  persister.find(:pull_request_comments, {'repo' => repo, 'owner' => owner,
@@ -528,6 +528,29 @@ module GHTorrent
528
528
  end
529
529
  end
530
530
 
531
+ def retrieve_issue_labels(owner, repo, issue_id)
532
+
533
+ end
534
+
535
+ def retrieve_repo_labels(owner, repo, refr = false)
536
+ repo_bound_items(owner, repo, :repo_labels,
537
+ "repos/#{owner}/#{repo}/labels",
538
+ {'repo' => repo, 'owner' => owner},
539
+ 'name', item = nil, refresh = refr)
540
+ end
541
+
542
+ def retrieve_repo_label(owner, repo, name)
543
+ repo_bound_item(owner, repo, name, :repo_labels,
544
+ "repos/#{owner}/#{repo}/labels",
545
+ {'repo' => repo, 'owner' => owner},
546
+ 'name')
547
+ end
548
+
549
+ def retrieve_issue_labels(owner, repo, issue_id)
550
+ url = ghurl("repos/#{owner}/#{repo}/issues/#{issue_id}/labels")
551
+ paged_api_request(url)
552
+ end
553
+
531
554
  # Get current Github events
532
555
  def get_events
533
556
  api_request "https://api.github.com/events"
@@ -19,7 +19,6 @@ module GHTorrent
19
19
  :sql_url => 'sql.url',
20
20
 
21
21
  :mirror_urlbase => 'mirror.urlbase',
22
- :mirror_pollevery => 'mirror.pollevery',
23
22
  :mirror_persister => 'mirror.persister',
24
23
  :mirror_commit_pages_new_repo => 'mirror.commit_pages_new_repo',
25
24
  :mirror_history_pages_back => 'mirror.history_pages_back',
@@ -49,7 +48,6 @@ module GHTorrent
49
48
  :sql_url => 'sqlite://github.db',
50
49
 
51
50
  :mirror_urlbase => 'https://api.github.com/',
52
- :mirror_pollevery => 'mirror.pollevery',
53
51
  :mirror_persister => 'noop',
54
52
  :mirror_commit_pages_new_repo => 3,
55
53
  :mirror_history_pages_back => 1,
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module GHTorrent
2
2
 
3
- VERSION = '0.7.3'
3
+ VERSION = '0.8'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghtorrent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: '0.8'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-12 00:00:00.000000000 Z
13
+ date: 2013-09-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: amqp
@@ -155,6 +155,8 @@ files:
155
155
  - lib/ghtorrent/migrations/012_add_forks_to_projects.rb
156
156
  - lib/ghtorrent/migrations/013_add_merged_to_pullreqs.rb
157
157
  - lib/ghtorrent/migrations/014_add_deleted_to_projects.rb
158
+ - lib/ghtorrent/migrations/015_fix_table_issue_labels.rb
159
+ - lib/ghtorrent/migrations/016_add_actor_pull_request_history.rb
158
160
  - lib/ghtorrent/migrations/mysql_defaults.rb
159
161
  - lib/ghtorrent/persister.rb
160
162
  - lib/ghtorrent/retriever.rb
@@ -180,8 +182,20 @@ files:
180
182
  homepage: https://github.com/gousiosg/github-mirror
181
183
  licenses: []
182
184
  post_install_message: !binary |-
183
- WxtbMzJtVmVyc2lvbiAwLjcuMxtbMG1dIFN1cHBvcnQgZm9yIHJ1bm5pbmcg
184
- aW4gc3RhbmRhbG9uZSBtb2RlCg==
185
+ WxtbMzJtVmVyc2lvbiAwLjgbWzBtXSBSZXRyaWV2ZSBhbmQgcHJvY2VzcyBp
186
+ c3N1ZSBsYWJlbHMKWxtbMzJtVmVyc2lvbiAwLjgbWzBtXSBSZXRyaXZlIGFu
187
+ ZCBwcm9jZXNzIGFjdG9ycyBmb3IgcHVsbCByZXF1ZXN0IGV2ZW50cwpbG1sz
188
+ Mm1WZXJzaW9uIDAuOBtbMG1dIFJldHJpZXZlIHB1bGxyZXEgY29tbWVudHMg
189
+ Zm9yIHByb2plY3RzIHdpdGggbm8gaXNzdWV0cmFja2VyClsbWzMybVZlcnNp
190
+ b24gMC44G1swbV0gQmV0dGVyIGhldXJpc3RpY3MgZm9yIGF2b2lkaW5nIGR1
191
+ bHBpY2F0ZSBlbnRyaWVzIGluIHB1bGwgcmVxdWVzdCBoaXN0b3JpZXMKWxtb
192
+ MzJtVmVyc2lvbiAwLjgbWzBtXSBUaGUgZXZlbnQgbG9hZGVyIG5vdyBsb2Fk
193
+ cyBldmVudHMgYnkgSURzIHRvIHJlZHVjZSBwcmVzc3VyZSB0byB0aGUgcXVl
194
+ dWUKWxtbMzJtVmVyc2lvbiAwLjgbWzBtXSBDb21wb3VuZCBpbmRleGVzIGlu
195
+ IE1vbmdvREIgYnkgZGVmYXVsdApbG1szMm1WZXJzaW9uIDAuOBtbMG1dIFgt
196
+ UmF0ZUxpbWl0LVJlc2V0IGhlYWRlciBzdXBwb3J0ClsbWzMybVZlcnNpb24g
197
+ MC44G1swbV0gUmVtb3ZlIGxvdHMgb2YgZGVhZCBjb2RlLCBnZW5lcmFsIGNs
198
+ ZWFudXBzCg==
185
199
  rdoc_options:
186
200
  - --charset=UTF-8
187
201
  require_paths: