omnifocus-github 1.8.3 → 2.0.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +18 -0
- data/README.rdoc +2 -2
- data/Rakefile +1 -1
- data/lib/omnifocus/github.rb +43 -35
- data.tar.gz.sig +0 -0
- metadata +47 -31
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d40c0e432d4783144432c7f703e64a0f0140b2fdd015400fd1995d3ac495276
|
4
|
+
data.tar.gz: eb73e87311e83ae8d27e7106f998c6e987a585b775f48e34e11ddea58e0402ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d821c4bde4f20d0580cbd0c53b908fc853b1c0e78b5bc95c51fcacdf4f8329880a8e2e57bf96c47403ac5462194954595616dc7a222ca41437251df862f4a62b
|
7
|
+
data.tar.gz: c3389bc17a46a8ec7735f8242954496bf4cc6f7056e42db2b089941ac62057fe041722fec8842a9f097d0fbd1a5157b2c8f387df8034309bdd3f5f6b2336aefd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
=== 2.0.0 / 2022-09-28
|
2
|
+
|
3
|
+
* 1 major enhancement:
|
4
|
+
|
5
|
+
* Removed #gh_client.
|
6
|
+
|
7
|
+
* 2 minor enhancements:
|
8
|
+
|
9
|
+
* #process now takes the prefix for the ticket ID (default: GH).
|
10
|
+
* Refactored #gh_client + most #populate_github_tasks into #github_clients that returns a hash of prefix => octokit_client.
|
11
|
+
|
12
|
+
=== 1.9.0 / 2020-02-12
|
13
|
+
|
14
|
+
* 2 minor enhancements:
|
15
|
+
|
16
|
+
* Exclude projects listed in ~/.omnifocus.yml.
|
17
|
+
* Updated to use omnifocus 2.6+.
|
18
|
+
|
1
19
|
=== 1.8.3 / 2019-12-15
|
2
20
|
|
3
21
|
* 1 bug fix:
|
data/README.rdoc
CHANGED
@@ -10,11 +10,11 @@ Plugin for omnifocus gem to provide github BTS synchronization.
|
|
10
10
|
Support for Github Enterprise:
|
11
11
|
|
12
12
|
In your git config, set the key github.accounts to a space
|
13
|
-
separated list of github accounts.
|
13
|
+
separated list of github accounts.
|
14
14
|
|
15
15
|
git config --global github.accounts "github myghe"
|
16
16
|
|
17
|
-
For each account API and web end points and authentication information
|
17
|
+
For each account API and web end points and authentication information
|
18
18
|
should be stored in the git config under a key matching the
|
19
19
|
account. For example:
|
20
20
|
|
data/Rakefile
CHANGED
data/lib/omnifocus/github.rb
CHANGED
@@ -5,12 +5,24 @@ $-w = old_w
|
|
5
5
|
Octokit.auto_paginate = true
|
6
6
|
|
7
7
|
module OmniFocus::Github
|
8
|
-
VERSION = "
|
8
|
+
VERSION = "2.0.0"
|
9
9
|
PREFIX = "GH"
|
10
10
|
|
11
11
|
def populate_github_tasks
|
12
12
|
processed = false
|
13
|
-
|
13
|
+
|
14
|
+
github_clients.each do |account, client|
|
15
|
+
account_label = account == "github" ? PREFIX : account
|
16
|
+
|
17
|
+
processed = true
|
18
|
+
process account_label, client
|
19
|
+
end
|
20
|
+
|
21
|
+
raise "No accounts authenticated. Bailing." unless processed
|
22
|
+
end
|
23
|
+
|
24
|
+
def github_clients
|
25
|
+
omnifocus_git_param(:accounts, "github").split(/\s+/).map { |account|
|
14
26
|
endpoints = {}
|
15
27
|
endpoints[:api] = omnifocus_git_param(:api, nil, account)
|
16
28
|
endpoints[:web] = omnifocus_git_param(:web, nil, account)
|
@@ -30,57 +42,53 @@ module OmniFocus::Github
|
|
30
42
|
|
31
43
|
auth[:name] = auth[:user] if auth[:name].nil?
|
32
44
|
|
33
|
-
|
34
|
-
account_label = account == "github" ? nil : account
|
35
|
-
|
36
|
-
process(account_label, gh_client(account, auth, endpoints))
|
37
|
-
end
|
45
|
+
client = nil
|
38
46
|
|
39
|
-
|
40
|
-
|
47
|
+
if account != "github"
|
48
|
+
if endpoints[:api] && endpoints[:web]
|
49
|
+
Octokit.configure do |c|
|
50
|
+
c.api_endpoint = endpoints[:api]
|
51
|
+
c.web_endpoint = endpoints[:web]
|
52
|
+
end
|
53
|
+
else
|
54
|
+
raise ArgumentError, "api and web endpoint configs required for github enterprise"
|
55
|
+
end
|
56
|
+
end
|
41
57
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
58
|
+
if auth[:user] && auth[:password]
|
59
|
+
client = Octokit::Client.new(:login => auth[:user],
|
60
|
+
:password => auth[:password])
|
46
61
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
c.api_endpoint = endpoints[:api]
|
52
|
-
c.web_endpoint = endpoints[:web]
|
53
|
-
end
|
62
|
+
client.user auth[:name]
|
63
|
+
elsif auth[:user] && auth[:oauth]
|
64
|
+
client = Octokit::Client.new :access_token => auth[:oauth]
|
65
|
+
client.user.login
|
54
66
|
else
|
55
|
-
raise ArgumentError, "
|
67
|
+
raise ArgumentError, "Missing authentication"
|
56
68
|
end
|
57
|
-
end
|
58
69
|
|
59
|
-
|
60
|
-
|
61
|
-
|
70
|
+
[account, client]
|
71
|
+
}.to_h
|
72
|
+
end
|
62
73
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
client.user.login
|
67
|
-
else
|
68
|
-
raise ArgumentError, "Missing authentication"
|
69
|
-
end
|
70
|
-
client
|
74
|
+
def omnifocus_git_param name, default = nil, prefix = "omnifocus-github"
|
75
|
+
param = `git config #{prefix}.#{name}`.chomp
|
76
|
+
param.empty? ? default : param
|
71
77
|
end
|
72
78
|
|
73
|
-
def process
|
79
|
+
def process prefix, client
|
74
80
|
client.list_issues.each do |issue|
|
75
81
|
pr = issue["pull_request"] && !issue["pull_request"]["diff_url"].nil?
|
76
82
|
number = issue.number
|
77
83
|
project = issue.repository.full_name.split("/").last
|
78
|
-
ticket_id = "#{
|
84
|
+
ticket_id = "#{prefix}-#{project}##{number}"
|
79
85
|
title = "#{ticket_id}: #{pr ? "[PR] " : ""}#{issue["title"]}"
|
80
86
|
# HACK
|
81
87
|
url = "https://github.com/#{issue.repository.full_name}/issues/#{number}"
|
82
88
|
note = "#{url}\n\n#{issue["body"]}"
|
83
89
|
|
90
|
+
next if excluded_projects.include? project
|
91
|
+
|
84
92
|
if existing[ticket_id] then
|
85
93
|
bug_db[project][ticket_id] = true
|
86
94
|
next
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnifocus-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
8
8
|
- aja
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- |
|
13
13
|
-----BEGIN CERTIFICATE-----
|
14
|
-
|
14
|
+
MIIDPjCCAiagAwIBAgIBBjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
15
15
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
16
|
-
|
16
|
+
GRYDY29tMB4XDTIxMTIyMzIzMTkwNFoXDTIyMTIyMzIzMTkwNFowRTETMBEGA1UE
|
17
17
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
18
18
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
19
19
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -23,14 +23,14 @@ cert_chain:
|
|
23
23
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
24
24
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
25
25
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
AQCKB5jfsuSnKb+t/Wrh3UpdkmX7TrEsjVmERC0pPqzQ5GQJgmEXDD7oMgaKXaAq
|
27
|
+
x2m+KSZDrqk7c8uho5OX6YMqg4KdxehfSLqqTZGoeV78qwf/jpPQZKTf+W9gUSJh
|
28
|
+
zsWpo4K50MP+QtdSbKXZwjAafpQ8hK0MnnZ/aeCsW9ov5vdXpYbf3dpg6ADXRGE7
|
29
|
+
lQY2y1tJ5/chqu6h7dQmnm2ABUqx9O+JcN9hbCYoA5i/EeubUEtFIh2w3SpO6YfB
|
30
|
+
JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
|
31
|
+
YsuyUzsMz6GQA4khyaMgKNSD
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2022-09-28 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: omnifocus
|
@@ -38,14 +38,14 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '2.
|
41
|
+
version: '2.6'
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '2.
|
48
|
+
version: '2.6'
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: octokit
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,27 +86,43 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.25'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
97
|
-
description:
|
98
|
-
for
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
96
|
+
version: '3.25'
|
97
|
+
description: |-
|
98
|
+
Plugin for omnifocus gem to provide github BTS synchronization.
|
99
|
+
|
100
|
+
Support for Github Enterprise:
|
101
|
+
|
102
|
+
In your git config, set the key github.accounts to a space
|
103
|
+
separated list of github accounts.
|
104
|
+
|
105
|
+
git config --global github.accounts "github myghe"
|
106
|
+
|
107
|
+
For each account API and web end points and authentication information
|
108
|
+
should be stored in the git config under a key matching the
|
109
|
+
account. For example:
|
110
|
+
|
111
|
+
git config --global github.user me
|
112
|
+
git config --global github.password mypassword
|
113
|
+
git config --global myghe.api https://ghe.mydomain.com/api/v3
|
114
|
+
git config --global myghe.api https://ghe.mydomain.com/
|
115
|
+
|
116
|
+
For each account can you specify the following parameters:
|
117
|
+
|
118
|
+
* api - specify an API endpoint other than
|
119
|
+
https://api.github.com. This is so you can point this at your Github
|
120
|
+
Enterprise endpoint.
|
121
|
+
|
122
|
+
* web - specify an API endpoint other than https://www.github.com. This
|
123
|
+
is so you can point this at your Github Enterprise endpoint
|
124
|
+
|
125
|
+
* user, password - A username and password pair for Basic http authentication.
|
110
126
|
email:
|
111
127
|
- ryand-ruby@zenspider.com
|
112
128
|
- kushali@rubyforge.org
|
@@ -128,7 +144,7 @@ licenses:
|
|
128
144
|
- MIT
|
129
145
|
metadata:
|
130
146
|
homepage_uri: https://github.com/seattlerb/omnifocus-github
|
131
|
-
post_install_message:
|
147
|
+
post_install_message:
|
132
148
|
rdoc_options:
|
133
149
|
- "--main"
|
134
150
|
- README.rdoc
|
@@ -145,8 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
161
|
- !ruby/object:Gem::Version
|
146
162
|
version: '0'
|
147
163
|
requirements: []
|
148
|
-
rubygems_version: 3.
|
149
|
-
signing_key:
|
164
|
+
rubygems_version: 3.3.12
|
165
|
+
signing_key:
|
150
166
|
specification_version: 4
|
151
167
|
summary: Plugin for omnifocus gem to provide github BTS synchronization
|
152
168
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|