opsask 2.3.4 → 2.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/public/js/opsask.js +1 -1
- data/tasks/generate-email-summary.rb +13 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5d6588009c5833af32f2a82dff7ca2965b587f8
|
4
|
+
data.tar.gz: 72eeeff4f7d0ee2aa8411e2a7c0252dec0237d23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5867344f0fe15a9cbe2ff1a2a5408636e4632d1836f08218ec01bf142ef7018b404c837c3e499da73c5dc8a53f83201b27baa463bb8dd3ebb24b420ccc28bd8f
|
7
|
+
data.tar.gz: d1d19b78eff8af268d54cbeab74772c8915643ef6c01ffc6e747e4437a7c5d638fa88d139383daea25a4c06b38c0ea15f0cec0849142a89b8cb27841f45229fa
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.5
|
data/public/js/opsask.js
CHANGED
@@ -20,16 +20,19 @@ USER, PASS = ARGV[0], ARGV[1]
|
|
20
20
|
|
21
21
|
def ask_jira constraints=nil
|
22
22
|
constraints = "AND #{constraints}" unless constraints.nil?
|
23
|
-
|
23
|
+
jql = {
|
24
|
+
'jql' => "project = Infrastructure #{constraints} ORDER BY created"
|
25
|
+
}
|
26
|
+
curl = %Q| curl -sL \
|
24
27
|
-u "#{USER}:#{PASS}" \
|
25
28
|
-XPOST "#{JIRA}/rest/api/latest/search" \
|
26
|
-
-H "Content-Type: application/json" -d '{
|
27
|
-
"jql": "project = Infrastructure #{constraints} ORDER BY created"
|
28
|
-
}'
|
29
|
+
-H "Content-Type: application/json" -d '#{JSON.generate(jql)}'
|
29
30
|
|
|
31
|
+
return curl
|
30
32
|
end
|
31
33
|
|
32
34
|
def inf_issues_where constraints=nil
|
35
|
+
# $stderr.puts constraints
|
33
36
|
JSON::parse(`#{ask_jira constraints}`)['issues']
|
34
37
|
end
|
35
38
|
|
@@ -47,17 +50,22 @@ end
|
|
47
50
|
untracked_today = inf_issues_where('due = endOfDay() AND resolution = unresolved AND assignee = denimcores')
|
48
51
|
tracked_today = inf_issues_where('due = endOfDay() AND resolution = unresolved AND assignee != denimcores')
|
49
52
|
resolved_today = inf_issues_where('due = endOfDay() AND resolution != unresolved')
|
53
|
+
uncategorized = inf_issues_where('due = endOfDay() AND "Ops Work Category" is EMPTY')
|
50
54
|
stragglers = inf_issues_where('due < startOfDay() AND labels in (OpsAsk) AND resolution = unresolved AND assignee != denimcores')
|
51
55
|
|
52
56
|
exit if untracked_today.empty? \
|
53
57
|
&& tracked_today.empty? \
|
54
58
|
&& resolved_today.empty? \
|
59
|
+
&& uncategorized.empty? \
|
55
60
|
&& stragglers.empty?
|
56
61
|
|
62
|
+
# $stderr.puts uncategorized.inspect
|
63
|
+
|
57
64
|
write_out 'Untracked', untracked_today
|
58
65
|
write_out 'Tracking', tracked_today
|
59
66
|
write_out 'Resolved', resolved_today
|
60
67
|
write_out 'Stragglers', stragglers
|
68
|
+
write_out 'Uncategorized', uncategorized
|
61
69
|
|
62
70
|
num_untracked_today = untracked_today.length
|
63
71
|
num_untracked = inf_issues_where('due < endOfDay() AND resolution = unresolved AND assignee = denimcores').length
|
@@ -70,4 +78,4 @@ elsif num_untracked > 1 && num_untracked_today == 0
|
|
70
78
|
puts %Q|<b>There are <a href="#{UNTRACKED}">#{num_untracked} untracked issues</a> from the past</b>|
|
71
79
|
elsif num_untracked > 1 && num_untracked_today > 0
|
72
80
|
puts %Q|<b>There are <a href="#{UNTRACKED}">#{num_untracked} additional untracked issues</a> from the past</b>|
|
73
|
-
end
|
81
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsask
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
208
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.4.5
|
209
|
+
rubygems_version: 2.4.5.1
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: Ask Ops for stuff
|