ellen-github 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +5 -0
- data/lib/ellen/github/actions/base.rb +25 -1
- data/lib/ellen/github/version.rb +1 -1
- data/lib/ellen/handlers/github.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95f00c5f502f16cf2abb8e3d8e56834be5b3a479
|
4
|
+
data.tar.gz: 7b0a6df18d8a221d3c82460b35616244a5e92b62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d27fb505a7df3055f57153931f5c6eb3792e5969bf074779a698ece084cc59eb2c0063dabd53dddce22cec9b881c84e3350205be173ecce7aef68d4bda831d1
|
7
|
+
data.tar.gz: 22bc48412bed3748997c76c8be5d060af9676c1b511ca2ab805d880f75ea2c646b80a904ee930a10e0ead41970b8d87b278e6247436c6f3fea7490c46e2a4e98
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -16,5 +16,10 @@ gem "ellen-github"
|
|
16
16
|
@ellen remember my github token <token> - Remember sender's GitHub access token
|
17
17
|
```
|
18
18
|
|
19
|
+
## ENV
|
20
|
+
```
|
21
|
+
GITHUB_HOST - Pass GitHub Host if needed (e.g. github.example.com)
|
22
|
+
```
|
23
|
+
|
19
24
|
## Image
|
20
25
|
![](https://raw.githubusercontent.com/r7kamura/ellen-github/master/images/screenshot.png)
|
@@ -33,12 +33,36 @@ module Ellen
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def client
|
36
|
-
Octokit::Client.new(
|
36
|
+
Octokit::Client.new(client_options)
|
37
37
|
end
|
38
38
|
|
39
39
|
def repository
|
40
40
|
message[:repo]
|
41
41
|
end
|
42
|
+
|
43
|
+
def client_options
|
44
|
+
client_options_with_nil_value.reject {|key, value| value.nil? }
|
45
|
+
end
|
46
|
+
|
47
|
+
def client_options_with_nil_value
|
48
|
+
{
|
49
|
+
access_token: access_token,
|
50
|
+
api_endpoint: api_endpoint,
|
51
|
+
web_endpoint: web_endpoint,
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
def web_endpoint
|
56
|
+
"https://#{github_host}/" if github_host
|
57
|
+
end
|
58
|
+
|
59
|
+
def api_endpoint
|
60
|
+
"https://#{github_host}/api/v3" if github_host
|
61
|
+
end
|
62
|
+
|
63
|
+
def github_host
|
64
|
+
ENV["GITHUB_HOST"]
|
65
|
+
end
|
42
66
|
end
|
43
67
|
end
|
44
68
|
end
|
data/lib/ellen/github/version.rb
CHANGED