omnifocus-github 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +3 -0
- data/README.txt +2 -1
- data/lib/omnifocus/github.rb +35 -3
- metadata +53 -16
data/History.txt
CHANGED
data/README.txt
CHANGED
data/lib/omnifocus/github.rb
CHANGED
@@ -2,9 +2,9 @@ require 'open-uri'
|
|
2
2
|
require 'yaml'
|
3
3
|
|
4
4
|
module OmniFocus::Github
|
5
|
-
VERSION = '1.0.
|
5
|
+
VERSION = '1.0.1'
|
6
6
|
|
7
|
-
GH_URL = "
|
7
|
+
GH_URL = "https://github.com"
|
8
8
|
|
9
9
|
def fetch url, key
|
10
10
|
base_url = "#{GH_URL}/api/v2/yaml"
|
@@ -13,6 +13,8 @@ module OmniFocus::Github
|
|
13
13
|
|
14
14
|
def populate_github_tasks
|
15
15
|
user = `git config --global github.user`.chomp
|
16
|
+
|
17
|
+
# Personal projects
|
16
18
|
projects = fetch("repos/show/#{user}", "repositories").select { |project|
|
17
19
|
project[:open_issues] > 0
|
18
20
|
}.map { |project|
|
@@ -20,11 +22,12 @@ module OmniFocus::Github
|
|
20
22
|
}
|
21
23
|
|
22
24
|
projects.sort.each do |project|
|
25
|
+
warn " scanning #{user}/#{project}"
|
23
26
|
fetch("issues/list/#{user}/#{project}/open", "issues").each do |issue|
|
24
27
|
number = issue["number"]
|
25
28
|
ticket_id = "GH-#{project}##{number}"
|
26
29
|
title = "#{ticket_id}: #{issue["title"]}"
|
27
|
-
url = "#{GH_URL}/#{user}/#{project}/issues/#
|
30
|
+
url = "#{GH_URL}/#{user}/#{project}/issues/#{number}"
|
28
31
|
|
29
32
|
if existing[ticket_id] then
|
30
33
|
bug_db[existing[ticket_id]][ticket_id] = true
|
@@ -34,5 +37,34 @@ module OmniFocus::Github
|
|
34
37
|
bug_db[project][ticket_id] = [title, url]
|
35
38
|
end
|
36
39
|
end
|
40
|
+
|
41
|
+
# Organization projects
|
42
|
+
orgs = fetch("user/show/#{user}/organizations", "organizations")
|
43
|
+
orgs.each do |o|
|
44
|
+
login = o["login"]
|
45
|
+
projects = fetch("repos/show/#{login}", "repositories")
|
46
|
+
projects = projects.select { |project| project[:open_issues] > 0}
|
47
|
+
projects = projects.map{|project| project[:name]}
|
48
|
+
|
49
|
+
projects.sort.each do |project|
|
50
|
+
warn " scanning #{login}/#{project}"
|
51
|
+
issues = fetch("issues/list/#{login}/#{project}/open", "issues")
|
52
|
+
issues.each do |issue|
|
53
|
+
number = issue["number"]
|
54
|
+
t_user = issue["user"]
|
55
|
+
ticket_id = "GH-#{project}##{number}"
|
56
|
+
title = "#{ticket_id}: #{issue["title"]}"
|
57
|
+
url = "#{GH_URL}/#{login}/#{project}/issues/#issue/#{number}"
|
58
|
+
|
59
|
+
next unless t_user == user
|
60
|
+
if existing[ticket_id] then
|
61
|
+
bug_db[existing[ticket_id]][ticket_id] = true
|
62
|
+
next
|
63
|
+
end
|
64
|
+
|
65
|
+
bug_db[project][ticket_id] = [title, url]
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
37
69
|
end
|
38
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnifocus-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Ryan Davis
|
@@ -9,29 +15,54 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-07-16 00:00:00 -07:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: omnifocus
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
27
|
-
|
28
|
-
|
29
|
-
|
36
|
+
name: minitest
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - ">="
|
32
42
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
43
|
+
hash: 11
|
44
|
+
segments:
|
45
|
+
- 2
|
46
|
+
- 0
|
47
|
+
- 2
|
48
|
+
version: 2.0.2
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: hoe
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 23
|
60
|
+
segments:
|
61
|
+
- 2
|
62
|
+
- 10
|
63
|
+
version: "2.10"
|
64
|
+
type: :development
|
65
|
+
version_requirements: *id003
|
35
66
|
description: Plugin for omnifocus gem to provide github BTS synchronization.
|
36
67
|
email:
|
37
68
|
- ryand-ruby@zenspider.com
|
@@ -51,7 +82,7 @@ files:
|
|
51
82
|
- Rakefile
|
52
83
|
- lib/omnifocus/github.rb
|
53
84
|
has_rdoc: true
|
54
|
-
homepage:
|
85
|
+
homepage: https://github.com/seattlerb/omnifocus-github
|
55
86
|
licenses: []
|
56
87
|
|
57
88
|
post_install_message:
|
@@ -61,21 +92,27 @@ rdoc_options:
|
|
61
92
|
require_paths:
|
62
93
|
- lib
|
63
94
|
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
64
96
|
requirements:
|
65
97
|
- - ">="
|
66
98
|
- !ruby/object:Gem::Version
|
99
|
+
hash: 3
|
100
|
+
segments:
|
101
|
+
- 0
|
67
102
|
version: "0"
|
68
|
-
version:
|
69
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
70
105
|
requirements:
|
71
106
|
- - ">="
|
72
107
|
- !ruby/object:Gem::Version
|
108
|
+
hash: 3
|
109
|
+
segments:
|
110
|
+
- 0
|
73
111
|
version: "0"
|
74
|
-
version:
|
75
112
|
requirements: []
|
76
113
|
|
77
114
|
rubyforge_project: seattlerb
|
78
|
-
rubygems_version: 1.
|
115
|
+
rubygems_version: 1.4.2
|
79
116
|
signing_key:
|
80
117
|
specification_version: 3
|
81
118
|
summary: Plugin for omnifocus gem to provide github BTS synchronization.
|