apadmi_grout 2.5.0 → 2.6.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af094b716e2764d75b2f0729c40c82e2bb2ffe13f2775a2e2d6480540c471922
|
4
|
+
data.tar.gz: 7ab7d36c4e120a348ee74e2e67386fd1f497d40c5bb684951777edef79caf5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586a0f1eaf5d0ca433ad18a9c09965da229459bd172a217e04d1ee74a82cfc349cd7841093b40b29f8762bbf37310f3a0a423731bfd1ded2e55697f32663c0a5
|
7
|
+
data.tar.gz: f77fb691459927030db6f936f5768aa69fd72b5906c23f044bc8e885a6a7084a9bd20c723a5736008a0f42800d955ffd935e8200200bb8ea9c6ec882bcd92e2f
|
data/CHANGELOG.md
CHANGED
@@ -24,7 +24,7 @@ module Apadmi
|
|
24
24
|
|
25
25
|
keys = keys.map { |k| sanitise_key(k) } # Allows supporting raw keys, and keys prefixed with a hash which is common ADO practice
|
26
26
|
|
27
|
-
res = @network_service.do_get("/wit/workitems?ids=#{keys.join(",")}&errorPolicy=omit&api-version=7.1-preview.2")
|
27
|
+
res = @network_service.do_get("/wit/workitems?ids=#{keys.join(",")}&$expand=#{@ado_config.expand_type}&errorPolicy=omit&api-version=7.1-preview.2")
|
28
28
|
parsed = JSON.parse(res.body)
|
29
29
|
items = parsed["value"]
|
30
30
|
|
@@ -82,6 +82,12 @@ module Apadmi
|
|
82
82
|
@network_service.do_post("/wit/workitems/#{key}/comments?#{API_VERSION_PARAM}-preview.3", payload.to_json)
|
83
83
|
end
|
84
84
|
|
85
|
+
# @param String key
|
86
|
+
# @param [Array<Hash>] payload
|
87
|
+
def update_ticket(key, payload)
|
88
|
+
@network_service.do_patch("/wit/workitems/#{key}?#{API_VERSION_PARAM}", payload.to_json)
|
89
|
+
end
|
90
|
+
|
85
91
|
# @param [String] key
|
86
92
|
# @param [String] tag
|
87
93
|
def add_tag(key, tag)
|
@@ -90,7 +96,7 @@ module Apadmi
|
|
90
96
|
"path" => "/fields/System.Tags",
|
91
97
|
"value" => tag
|
92
98
|
}]
|
93
|
-
|
99
|
+
update_ticket(key, payload)
|
94
100
|
end
|
95
101
|
|
96
102
|
# @param [String] key
|
@@ -104,7 +110,7 @@ module Apadmi
|
|
104
110
|
"path" => "/fields/System.Tags",
|
105
111
|
"value" => new_tags.join("; ")
|
106
112
|
}]
|
107
|
-
|
113
|
+
update_ticket(key, payload)
|
108
114
|
end
|
109
115
|
|
110
116
|
# @param [String] key
|
@@ -132,7 +138,7 @@ module Apadmi
|
|
132
138
|
"path" => "/fields/Microsoft.VSTS.Build.IntegrationBuild",
|
133
139
|
"value" => versions.join("; ")
|
134
140
|
}]
|
135
|
-
|
141
|
+
update_ticket(key, payload)
|
136
142
|
end
|
137
143
|
|
138
144
|
# @param [String] key
|
@@ -153,7 +159,27 @@ module Apadmi
|
|
153
159
|
"path" => "/fields/System.State",
|
154
160
|
"value" => state_name
|
155
161
|
}]
|
156
|
-
|
162
|
+
update_ticket(key, payload)
|
163
|
+
end
|
164
|
+
|
165
|
+
# @param [String] key
|
166
|
+
# @param [String] user
|
167
|
+
def assign_to_user(key, user)
|
168
|
+
key = sanitise_key(key)
|
169
|
+
|
170
|
+
payload = if user
|
171
|
+
[{
|
172
|
+
"op": "add",
|
173
|
+
"path": "/fields/System.AssignedTo",
|
174
|
+
"value": user
|
175
|
+
}]
|
176
|
+
else
|
177
|
+
[{
|
178
|
+
"op": "remove",
|
179
|
+
"path": "/fields/System.AssignedTo"
|
180
|
+
}]
|
181
|
+
end
|
182
|
+
update_ticket(key, payload)
|
157
183
|
end
|
158
184
|
|
159
185
|
# @param [String] key
|
data/lib/apadmi/grout/version.rb
CHANGED