danger-slack 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slack/gem_version.rb +1 -1
- data/lib/slack/plugin.rb +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e678871afb7cf5d4e36e29f7fb6b48c6f17e8946
|
4
|
+
data.tar.gz: b21737558133b510cc426822004dcfefc6ab0323
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74684cd390d1d6437c9c7e113930b51a3fb57b8af60904e9032fa680f0d90040f73cd00461d58eb8eb612fd2ad09fd42d91160659eb0c6ad7c695055d597f45d
|
7
|
+
data.tar.gz: '09d99fa0c7e8f7268fbfdc5ac99be54beaa3e56d64a235583c316b1a410b615f66c6fce8d42d4de33bfca1a88ca2ed74c9620e340951d523f5115ff0f964ad85'
|
data/lib/slack/gem_version.rb
CHANGED
data/lib/slack/plugin.rb
CHANGED
@@ -34,6 +34,7 @@ module Danger
|
|
34
34
|
end
|
35
35
|
|
36
36
|
# get slack team members
|
37
|
+
# For more information, see also https://api.slack.com/methods/users.list
|
37
38
|
#
|
38
39
|
# @return [[Hash]]
|
39
40
|
def members
|
@@ -41,7 +42,8 @@ module Danger
|
|
41
42
|
Array(JSON.parse(res.body)['members'])
|
42
43
|
end
|
43
44
|
|
44
|
-
# get slack team
|
45
|
+
# get slack team channels
|
46
|
+
# For more information, see also https://api.slack.com/methods/channels.list
|
45
47
|
#
|
46
48
|
# @return [[Hash]]
|
47
49
|
def channels
|
@@ -50,9 +52,14 @@ module Danger
|
|
50
52
|
end
|
51
53
|
|
52
54
|
# notify to Slack
|
53
|
-
#
|
55
|
+
#
|
56
|
+
# @param [String] channel
|
57
|
+
# It is channel to be notified, defaults to '#general'
|
58
|
+
# @param [String] text
|
59
|
+
# text message posted to slack, defaults to nil.
|
60
|
+
# if nil, this method post danger reports to slack.
|
54
61
|
# @return [void]
|
55
|
-
def notify(channel
|
62
|
+
def notify(channel: '#general', text: nil, **opts)
|
56
63
|
attachments = text.nil? ? report : []
|
57
64
|
text ||= '<http://danger.systems/|Danger> reports'
|
58
65
|
@conn.post do |req|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-slack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shunsuke maeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|