lita-gitlab 1.0.2 → 1.0.3

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: c0cb4c7e98cb5e2a1b5db2425979af203a10c8fe
4
- data.tar.gz: 7bf90c8a2f3453d8f3c567bf92b4a75b1b30bbb1
3
+ metadata.gz: 7f37561665bdfd52aab2af51b43f6b076d5b763d
4
+ data.tar.gz: 6b0e0d041e495003ffaba88b71e8723e34811b70
5
5
  SHA512:
6
- metadata.gz: d5d62f466bfee6b6916b39c39b666abe28e045383777e6042449b3b93a8ac21ebb6cfe42e89de6f64d35248c69ed1daf4c2955c876a12f0355fea15015a408a6
7
- data.tar.gz: 99b85bd8c00d17709a1444566fa160f7c225286027b7ba5cfa12775ef80667a405286c8ddb604a3808da45f0eb5e21ef80dc626cf7ab6293fef49b071c2a9f36
6
+ metadata.gz: 65177e85af88ad971cc18166821d989c73cd4d84fd29cbd5aa1073270159c07550dbdd783599c602fb4be9f82efb4f68a0b0e568e0d78926357fec0419593e94
7
+ data.tar.gz: b3e4fb379463ee6f58f0e36392ed7f1756a4ed9623c0bdbb4690b90933eb0a2b5469e7325ee1232f971c1c4898a630aa98c6d929d59d33eb15f74f2936713608
data/README.md CHANGED
@@ -32,15 +32,17 @@ ie: `my_team`.
32
32
  ``` ruby
33
33
  Lita.configure do |config|
34
34
  config.handlers.gitlab.default_room = '#general'
35
- config.url = 'http://example.gitlab/'
36
- config.group = 'group_name'
35
+ config.handlers.gitlab.url = 'http://example.gitlab/'
36
+ config.handlers.gitlab.group = 'group_name'
37
37
  end
38
38
  ```
39
39
 
40
40
  ## Usage
41
41
 
42
42
  * `targets` Channel(s) separated by commas.
43
- You will need to add a GitLab Webhook url that points to: `http://address.of./lita/gitlab?targets=<targets>`
43
+ * `project` The name of the specific project (only needed for webhooks).
44
+
45
+ You will need to add a GitLab Webhook url that points to: `http://address.of./lita/gitlab?targets=<targets>&project=<project>`
44
46
 
45
47
  ## License
46
48
 
@@ -16,7 +16,7 @@ module Lita
16
16
  data[:project] = request.params['project']
17
17
  message = format_message(data)
18
18
  if message
19
- targets = request.params['targets'] || self.config.default_room
19
+ targets = request.params['targets'] || Lita.config.handlers.gitlab.default_room
20
20
  rooms = []
21
21
  targets.split(',').each do |param_target|
22
22
  rooms << param_target
@@ -49,9 +49,9 @@ module Lita
49
49
  if data.key? :object_kind
50
50
  if data[:object_attributes].key? :target_branch
51
51
  # Merge request
52
- url = "#{self.config.url}"
53
- url += data[:project] ? "#{self.config.group}/#{data[:project]}/merge_requests/#{data[:object_attributes][:iid]}" : "groups/#{self.config.group}"
54
- data[:object_attributes][:link] = "<#{url}|#{data[:title]}>"
52
+ url = "#{Lita.config.handlers.gitlab.url}"
53
+ url += data[:project] ? "#{Lita.config.handlers.gitlab.group}/#{data[:project]}/merge_requests/#{data[:object_attributes][:iid]}" : "groups/#{Lita.config.handlers.gitlab.group}"
54
+ data[:object_attributes][:link] = "<#{url}|#{data[:object_attributes][:title]}>"
55
55
  build_message "web.#{data[:object_kind]}.#{data[:object_attributes][:state]}", data[:object_attributes]
56
56
  else
57
57
  # Issue
data/lita-gitlab.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-gitlab'
3
- spec.version = '1.0.2'
3
+ spec.version = '1.0.3'
4
4
  spec.authors = ['Emilio Figueroa']
5
5
  spec.email = ['emiliofigueroatorres@gmail.com']
6
6
  spec.description = %q{A Lita handler that will display GitLab messages in the channel}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emilio Figueroa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-20 00:00:00.000000000 Z
11
+ date: 2014-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita