apadmi_grout 2.2.3 → 2.3.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: 454ad88ccf8626779e456e3960bf0cb518befae8383418865dceffd8116e4bad
4
- data.tar.gz: 2e17f78ac813ccb6d7d6571b38c34e98f2584456626e4bd953ebf5346050b379
3
+ metadata.gz: 8a044d2b76db5a199809db40b238d152df0b91b85f0092730177b60a104b5f9d
4
+ data.tar.gz: 9d46bc9e4c75765bd2fa056494af0cd42cfa72e623d331cac330da97388121cc
5
5
  SHA512:
6
- metadata.gz: 5d1babf7b932f6c92637c9fe22e2ec9814630043356c3fa36092551b7a181440bd23d539329fe053de27260da2664c2b7ba0db00cc73ee3ffa585584c210a770
7
- data.tar.gz: b2d9904a1de99ed5bbbe8e401447a98f58b4514616853296828d17f7c743ffafa8a129858bd3bf3fbd90ea5e8701856771f2a45492ada3d6afe34bc651013f13
6
+ metadata.gz: bb6d2a7ca64f3a9127ea8f625d1010e89e1febf0b25c787eaecacbe064e27da85ae82e587ed993c357fee1587e67c59cc41897712b4dc536e6b7ce9d6fb32dc9
7
+ data.tar.gz: 674d00cfa25d7fce59f316dea0fd63ab2aef0b21ca31d4ed583c132cc679dda8ec3421e6b9339a47c60d4b12ea3a614f614a36f3e73581d570e2f015dad6a95c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Core Changelog
2
2
 
3
+ ## [2.3.1] - 2023-04-05
4
+ * Makes loading pull request information more robust for situations where a ticket has no PRs.
5
+
6
+ ## [2.3.0] - 2023-04-03
7
+ * No changes, version bump to keep in sync with fastlane plugin.
8
+
3
9
  ## [2.2.3] - 2023-01-26
4
10
  * Filter tickets with id 0 from changelog since these are almost always just placeholders.
5
11
 
@@ -137,9 +137,12 @@ module Apadmi
137
137
  query_string = "issueId=#{issue.raw_object.id}&applicationType=bitbucket&dataType=pullrequest"
138
138
  response = @network_service.do_get("/rest/dev-status/latest/issue/details?#{query_string}")
139
139
 
140
- return [] if JSON.parse(response.body)["detail"].empty?
140
+ parsed_detail = JSON.parse(response.body)["detail"]
141
141
 
142
- JSON.parse(response.body)["detail"][0]["pullRequests"].map do |pr|
142
+ return [] if parsed_detail.empty?
143
+ return [] unless parsed_detail[0].key?("pullRequests")
144
+
145
+ parsed_detail[0]["pullRequests"].map do |pr|
143
146
  PullRequest.new(pr["id"], pr["name"], pr["status"].to_s == "MERGED", pr["status"].to_s == "DECLINED")
144
147
  end
145
148
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AndroidBuildType
4
+ AAB = "aab"
5
+ APK = "apk"
6
+ end
7
+
8
+ module Apadmi
9
+ module Grout
10
+ # Generic Command parsing Utils
11
+ class CommandParsingUtils
12
+ def self.determining_build_type(command)
13
+ raise "Command can't be blank" if command.blank?
14
+
15
+ split = command.split(":", -1).last
16
+
17
+ return AndroidBuildType::APK if split.starts_with?("assemble")
18
+ return AndroidBuildType::AAB if split.starts_with?("bundle")
19
+
20
+ raise "Could not determine if #{command} generates an apk or aab"
21
+ end
22
+ end
23
+ end
24
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Apadmi
4
4
  module Grout
5
- VERSION = "2.2.3"
5
+ VERSION = "2.3.1"
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.2.3
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apadmi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-26 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -83,6 +83,7 @@ files:
83
83
  - lib/apadmi/grout/service/board_service/ado_board_service.rb
84
84
  - lib/apadmi/grout/service/board_service/board_service.rb
85
85
  - lib/apadmi/grout/service/board_service/jira_board_service.rb
86
+ - lib/apadmi/grout/utils/command_parsing_utils.rb
86
87
  - lib/apadmi/grout/utils/filename_utils.rb
87
88
  - lib/apadmi/grout/utils/git_utils.rb
88
89
  - lib/apadmi/grout/utils/logger.rb