apadmi_grout 2.5.0 → 2.6.1
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: 8db6b7eca5ee2eb554e888bd25c267dde94978757015ed037c0d193dc372bc51
|
4
|
+
data.tar.gz: 514ebf8f1057e01d9b36867b5e6ee419c037691039f5a2165cca471c56a2bd9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9fc365c23f6292fe1690b8b3250e7e9dd7195854f6dceb5cb0a704fb4849c9b63c1a514e786df4b911c08805237416d59c21f191e631f3bec65273a329abff1
|
7
|
+
data.tar.gz: 0d45b1e9c056154c19733486bad4dd34ed37fb3f7da68c825a2c639eeda9514138fce722bfe546d4238ab9d24da96597ac8520796c1132f58537e79bc776fd54
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Core Changelog
|
2
2
|
|
3
|
+
## [2.6.1] - 2024-01-09
|
4
|
+
* Fix: missing blank? method because ActiveSupport requires you to load the extensions explicitly from 7.1
|
5
|
+
|
6
|
+
## [2.6.0] - 2023-09-20
|
7
|
+
* Add option to expand ADO tickets with additional information
|
8
|
+
* Add ability to assign users to ADO tickets
|
9
|
+
|
3
10
|
## [2.5.0] - 2023-09-20
|
4
11
|
* Added more options to the ADO queries for more in granular filtering.
|
5
12
|
|
@@ -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
data/lib/apadmi_grout.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apadmi_grout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apadmi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|