fastlane-plugin-stream_actions 0.3.40 → 0.3.41
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: b994198c15b60fa994aaa977bf3583961075f4ac62f2f9457a97fad4c8835a5e
|
4
|
+
data.tar.gz: 116aa007b31d1dbb3faa57c9da4b7a5232ea70d429a91023f345c70ad2bb1336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 645f2d5d8342bbd20a7fb0a0f322123abc6b847d9673ad13f783cf5bdd7338ba9f44bc62f2018dc7f1a2566134e63115750d0c81a346cb9cca2a6dfd084fd6ae
|
7
|
+
data.tar.gz: 2a2a70ab759cdf167ad9b5e821ff2ab440a8eb8ca7ffe14a4d55d50cae4dc21b288d5e482086b344d86c8c0d0c1922e86b6534a6c6f2c2f20a9eb12e64620850
|
@@ -3,11 +3,22 @@ module Fastlane
|
|
3
3
|
class PrCommentAction < Action
|
4
4
|
def self.run(params)
|
5
5
|
if params[:pr_num]
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
additional_args = []
|
7
|
+
if params[:edit_last_comment_with_text]
|
8
|
+
UI.message('Checking last comment for required pattern.')
|
9
|
+
last_comment = sh("gh pr view #{params[:pr_num]} --json comments --jq '.comments | map(select(.author.login == \"Stream-SDK-Bot\")) | last'")
|
10
|
+
last_comment_match = params[:edit_last_comment_with_text] && last_comment.include?(params[:edit_last_comment_with_text])
|
11
|
+
|
12
|
+
if last_comment_match
|
13
|
+
additional_args << '--edit-last'
|
14
|
+
else
|
15
|
+
UI.important('Last comment does not match the pattern.')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
sh("gh pr comment #{params[:pr_num]} -b '#{params[:text]}' #{additional_args.join(' ')}")
|
19
|
+
UI.success('PR comment been added.')
|
9
20
|
else
|
10
|
-
UI.
|
21
|
+
UI.error('Skipping the PR comment because PR number has not been provided.')
|
11
22
|
end
|
12
23
|
end
|
13
24
|
|