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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c21388b8fcf8e76f761b13691501995e65a58878
4
- data.tar.gz: 6f8c349065b734be1e7b1a2bbb22c1ef2577e528
3
+ metadata.gz: e678871afb7cf5d4e36e29f7fb6b48c6f17e8946
4
+ data.tar.gz: b21737558133b510cc426822004dcfefc6ab0323
5
5
  SHA512:
6
- metadata.gz: b8cf74c5b8fc746469475bd35031aee285734fbe2e8b0476cc08837f2ac6266cf5e4b2e16e624475f2af81a9fcaea2a94193f3394e3e4c96ecda9f961cded4d4
7
- data.tar.gz: 0feafb8d7ea2274aac63ecfa83ad72086943ff631828c061b95d391a8a4d6e4636d79a9c7ae8914d386c5f85696cb3753c6bc1c6dbc93bac8bef02b32735f12f
6
+ metadata.gz: 74684cd390d1d6437c9c7e113930b51a3fb57b8af60904e9032fa680f0d90040f73cd00461d58eb8eb612fd2ad09fd42d91160659eb0c6ad7c695055d597f45d
7
+ data.tar.gz: '09d99fa0c7e8f7268fbfdc5ac99be54beaa3e56d64a235583c316b1a410b615f66c6fce8d42d4de33bfca1a88ca2ed74c9620e340951d523f5115ff0f964ad85'
@@ -1,3 +1,3 @@
1
1
  module Slack
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
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 members
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
- # A method that you can call from your Dangerfile
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:, text: nil, **opts)
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.1
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-28 00:00:00.000000000 Z
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