apadmi_grout 2.1.0 → 2.2.2

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: f1a387b90108f0657af3875457b1eb98440b54d7fdf6d62a9750fe1af10aeca5
4
- data.tar.gz: 25fe6b6ca1083a991f088d2161f49997f04944dda1225617192c9fcf2494f511
3
+ metadata.gz: 22c82a973e8fcdff8c70360fa27c58ff9f79e3bc6ef9ff4175db7d646da499af
4
+ data.tar.gz: aca19ee1e0f6bc2f710cb056efea7d0c8507ec01ab7ebfaa407bcc9eb79f91dd
5
5
  SHA512:
6
- metadata.gz: ca2dee35cca80456ca3ebd01b8ab1e1c89eb6c9bad069b36a1e20f8ae36bb511144fed3de12d8dccc31cc8c9dd364684bbdcee4af69244ff180d6e8af4ac24d2
7
- data.tar.gz: 49414ee4d8507110fed1bbf50946c16357039aacbc1e6657f32c1c4b4777d0ea013559da5c99fc65c77ea5a55d5d4e61479ed7b433dac81885d532dcab4eeaaa
6
+ metadata.gz: c6fa52813fe17ff8998ceab124376a4896bf0b01c11270da86f75f9d84ce61686cbe07c509b381e6eaa6878cecd4f7d6d56152e1c8238bded0259f2eab935c80
7
+ data.tar.gz: 2f96593677812988550c7c9c89cc0c753271987cf038e93bb5f176cdf8bd80c37ad062b9629101e085e0d4d85eacd675c7b4909fbdd138951a036ea58cfb8500
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Core Changelog
2
2
 
3
- ## [2.1.0] - 22-07-26
3
+ ## [2.2.2] - 2022-08-24
4
+ * Suppress ADO errors when requesting tickets that don't exist - match JIRA behaviour
5
+
6
+ ## [2.2.1] - 2022-08-21
7
+ * Reduce ruby version to match what bitrise has installed
8
+
9
+ ## [2.2.0] - 2022-08-16
10
+ * Bumped min ruby version to 3.0.0 to prevent subtle bugs
11
+ * Removed references to JIRA in default release note templates
12
+ * Fixed issues with git warnings being treated like errors
13
+
14
+ ## [2.1.0] - 2022-07-26
4
15
  * Added a few bitrise utils to support listing builds, triggering builds and downloading artifacts.
5
16
  * Added utilities to the network service to upload files
6
17
 
@@ -20,9 +20,9 @@ module Apadmi
20
20
  Commit Hash: {{config.commit_hash}}
21
21
  [CI/CD build \#{{config.ci_build_number}}]({{config.ci_build_url}})
22
22
 
23
- ## Jira Tickets Moved By This Build
23
+ ## Tickets Moved By This Build
24
24
  {{ rendered_moved_issues }}
25
- ## Jira Sprint Release notes
25
+ ## Sprint Release notes
26
26
  {{ rendered_release_issues }} }
27
27
  end
28
28
 
@@ -24,13 +24,13 @@ 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(",")}&api-version=7.1-preview.2")
27
+ res = @network_service.do_get("/wit/workitems?ids=#{keys.join(",")}&errorPolicy=omit&api-version=7.1-preview.2")
28
28
  parsed = JSON.parse(res.body)
29
29
  items = parsed["value"]
30
30
 
31
- return if items.nil? || items.empty?
31
+ return [] if items.nil? || items.compact.empty?
32
32
 
33
- items.map { |i| Apadmi::Grout::Issue.from_ado_hash(i) }
33
+ items.compact.map { |i| Apadmi::Grout::Issue.from_ado_hash(i) }
34
34
  end
35
35
 
36
36
  # @param component [String] Included to be consistent with JIRA, this will boil down to a tag in ADO
@@ -9,16 +9,16 @@ module Apadmi
9
9
  # Gets the root of the Git repo we're in
10
10
  # @return [String] The full path for the root of this Git repo
11
11
  def self.git_root
12
- stdout, stderr, = Open3.capture3("git rev-parse --show-toplevel")
13
- raise "Failed to get git root: #{stderr}" unless stderr.strip.empty?
12
+ stdout, stderr, status = Open3.capture3("git rev-parse --show-toplevel")
13
+ raise "Failed to get git root: #{stderr}" unless status.success?
14
14
 
15
15
  stdout.strip
16
16
  end
17
17
 
18
18
  # Gets the commit hash of the current HEAD
19
19
  def self.commit_hash
20
- stdout, stderr, = Open3.capture3("git rev-parse HEAD")
21
- raise "Failed to get hash: #{stderr}" unless stderr.strip.empty?
20
+ stdout, stderr, status = Open3.capture3("git rev-parse HEAD")
21
+ raise "Failed to get hash: #{stderr}" unless status.success?
22
22
 
23
23
  stdout.strip
24
24
  end
@@ -27,16 +27,16 @@ module Apadmi
27
27
  # See more details here: https://git-scm.com/docs/git-rev-list
28
28
  # @return [String] The number of commits
29
29
  def self.number_of_commits
30
- stdout, stderr, = Open3.capture3("git rev-list HEAD --count")
31
- raise "Failed to get commit number: #{stderr}" unless stderr.strip.empty?
30
+ stdout, stderr, status = Open3.capture3("git rev-list HEAD --count")
31
+ raise "Failed to get commit number: #{stderr}" unless status.success?
32
32
 
33
33
  stdout.strip
34
34
  end
35
35
 
36
36
  # Runs a git fetch all
37
37
  def self.fetch_all
38
- stdout, stderr, = Open3.capture3("git fetch --all")
39
- raise "Failed to fetch #{stderr}" unless stderr.strip.empty?
38
+ stdout, stderr, status = Open3.capture3("git fetch --all")
39
+ raise "Failed to fetch #{stderr}" unless status.success?
40
40
 
41
41
  stdout.strip
42
42
  end
@@ -45,8 +45,8 @@ module Apadmi
45
45
  # @param grep_conditions [Array<String>] values to be passed in as grep cases (https://git-scm.com/docs/git-log)
46
46
  def self.merge_changelog(grep_conditions)
47
47
  command = "git log HEAD --merges --format=%s#{grep_conditions.map { |c| " --grep #{c}" }.join(" ")}"
48
- stdout, stderr, = Open3.capture3(command)
49
- raise "Failed to get changelog: #{stderr}" unless stderr.strip.empty?
48
+ stdout, stderr, status = Open3.capture3(command)
49
+ raise "Failed to get changelog: #{stderr}" unless status.success?
50
50
 
51
51
  stdout
52
52
  end
@@ -55,8 +55,8 @@ module Apadmi
55
55
  # @param grep_conditions [Array<String>] values to be passed in as grep cases (https://git-scm.com/docs/git-log)
56
56
  def self.invert_changelog(grep_conditions)
57
57
  command = "git log --all ^HEAD --merges --format=%s#{grep_conditions.map { |c| " --grep #{c}" }.join(" ")}"
58
- stdout, stderr, = Open3.capture3(command)
59
- raise "Failed to get changelog: #{stderr}" unless stderr.strip.empty?
58
+ stdout, stderr, status = Open3.capture3(command)
59
+ raise "Failed to get changelog: #{stderr}" unless status.success?
60
60
 
61
61
  stdout
62
62
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Apadmi
4
4
  module Grout
5
- VERSION = "2.1.0"
5
+ VERSION = "2.2.2"
6
6
  end
7
7
  end
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.1.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apadmi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -104,14 +104,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
- version: 2.7.0
107
+ version: 2.7.6
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.1.2
114
+ rubygems_version: 3.2.3
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Apadmi build tool utils for use through Fastlane on Android and iOS.