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: 9d07284bafaf1a903c4ec18f02f3236b9618a11175e0e80014b5a2b208e6adee
4
- data.tar.gz: 25157db9413e49166e0200ca96f685f5e88c8667a35b54105f61797a0d78aea9
3
+ metadata.gz: b994198c15b60fa994aaa977bf3583961075f4ac62f2f9457a97fad4c8835a5e
4
+ data.tar.gz: 116aa007b31d1dbb3faa57c9da4b7a5232ea70d429a91023f345c70ad2bb1336
5
5
  SHA512:
6
- metadata.gz: c6743a7959c88d2557bfd4150828bced03de863a75777cbc2ac905adee2b5bd2932a9754440014bdbf5573d18669c06a571ed0515e934c9a7a2d016a471f715c
7
- data.tar.gz: bf7f59c648b09424cf150e11e63b7b5a88a7aa5274f3785c2837e54e3d791d20ceb986efa0ca1a177a576d4ba6fb7748276600b6cd80d343f4babaa1c21ee05e
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
- last_comment = sh("gh pr view #{params[:pr_num]} --json comments --jq '.comments | map(select(.author.login == \"Stream-SDK-Bot\")) | last'")
7
- edit_last_comment = params[:edit_last_comment_with_text] && last_comment.include?(params[:edit_last_comment_with_text]) ? '--edit-last' : ''
8
- sh("gh pr comment #{params[:pr_num]} #{edit_last_comment} -b '#{params[:text]}'")
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.important('Skipping the PR comment because PR number has not been provided.')
21
+ UI.error('Skipping the PR comment because PR number has not been provided.')
11
22
  end
12
23
  end
13
24
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.40'
3
+ VERSION = '0.3.41'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.40
4
+ version: 0.3.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream