lita-rally 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/lita/handlers/rally.rb +15 -7
- data/lita-rally.gemspec +1 -1
- 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: 1de7817b02a56a6c0942f304732757084f795319
|
4
|
+
data.tar.gz: 78beb182720543e7a7eeee3685c23950a4c22d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d44121cd9ab8bd1598a6bd1f39c5a5b77eedbfc52128352ae27896041773b4f9f9a705891b6645ad2bfa1fd09c39e2b980936ebd63bb7319966a676b8c2d259
|
7
|
+
data.tar.gz: 84c1a4b67847fe00f7cb2b62ec5811525557eb5eb70cda5c3e8f8f87384c4a0e99cb2aa71cf3565320310b880a6eeb8afb3dddf039dc46f9a68d6aa10e302979
|
data/README.md
CHANGED
@@ -129,6 +129,15 @@ belongs to me of specific type. (Limited to type Defect, Story, Task) Look up
|
|
129
129
|
involves using HipChat to determine user's e-mail. HipChat user's registered
|
130
130
|
e-mail must match Rally user registered e-mail.
|
131
131
|
|
132
|
+
```
|
133
|
+
lita rally for [@]mention
|
134
|
+
lita rally <defect|defects|story|stories|task|tasks> for [@]mention
|
135
|
+
```
|
136
|
+
|
137
|
+
**(HipChat Only, require hipchat_token config)** Similar to ```rally mine```
|
138
|
+
and ```rally my ...```, except it'll look up the @mention user instead of user
|
139
|
+
executed the command.
|
140
|
+
|
132
141
|
```
|
133
142
|
lita rally <start|pause|finish|accept|backlog> <FormattedID>
|
134
143
|
```
|
data/lib/lita/handlers/rally.rb
CHANGED
@@ -158,24 +158,32 @@ module Lita
|
|
158
158
|
'(HipChat Only) Find defects/stories/tasks belongs to me'
|
159
159
|
})
|
160
160
|
|
161
|
-
route( /^rally
|
162
|
-
'rally @mention' =>
|
161
|
+
route( /^rally for (.+)$/, :rally_find_mention, command: true, help: {
|
162
|
+
'rally for (@)mention' =>
|
163
163
|
'(HipChat Only) Find all defects/stories/tasks belongs to @mention'
|
164
164
|
})
|
165
165
|
|
166
|
-
route( /^rally
|
166
|
+
route( /^rally (defect|defects|story|stories|task|tasks) for (.+)$/,
|
167
167
|
:rally_find_mention, command: true, help: {
|
168
|
-
'rally
|
168
|
+
'rally <defect|story|task> for (@)mention' =>
|
169
169
|
'(HipChat Only) Find defects/stories/tasks belongs to @mention'
|
170
170
|
})
|
171
171
|
|
172
172
|
def rally_find_mention(response)
|
173
173
|
if config.hipchat_token
|
174
|
-
|
174
|
+
p1 = response.matches[0][0]
|
175
|
+
p2 = response.matches[0][1]
|
176
|
+
|
177
|
+
type, user =
|
178
|
+
if %w{defect defects story stories task tasks}.include?(p1)
|
179
|
+
[p1, p2]
|
180
|
+
else
|
181
|
+
[nil, p1]
|
182
|
+
end
|
175
183
|
|
176
|
-
|
184
|
+
email = hipchat_find_user(user[0] == '@' ? user[1..-1] : user)
|
177
185
|
|
178
|
-
|
186
|
+
raise "Could not find user's email" unless email
|
179
187
|
|
180
188
|
type = 'story' if type == 'stories'
|
181
189
|
type = type[0..-2] if !type.nil? && type[-1] == 's'
|
data/lita-rally.gemspec
CHANGED