fastlane-plugin-stream_actions 0.3.92 → 0.3.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 723c887876cfdacffd749a5796588dbf7fd9143672b110f41db7b6252a988690
4
- data.tar.gz: 8efc3a2ce781fda05d8afc53d87d08642cc8a572f0dd8d2d3813c67ee39dae54
3
+ metadata.gz: f9a5a2923c5b1d82d4317903160697b17155f1994ecddd28cff49c25ad0bd55a
4
+ data.tar.gz: 69d56018e538008e9c9240373e5d4bfcaf0d04585baaf4e1c00a981a4b535dc2
5
5
  SHA512:
6
- metadata.gz: d32a656dd0856ded19d8de294dfcbc63b1eb4d6fb0f7c9bbc1eaa215a63cbc3eca25e480e723691be27c3962f68fa02dbc8795e6b993ffb5ff686537a0fa539f
7
- data.tar.gz: 26b4ed074646b96bcd369b8d2ef58c48cb41de00f9892f5512966aae08e3fba53de25c7558b2b3f0b482e744ff1d4599fe1a9092295c1668fa47f3f1f94a30c5
6
+ metadata.gz: 905601f4a4cec4c236f9a6638a7e96ed83d4b0858f12a64ddb65febf621f44c06e2f1af9b42077c7b8ac2f26ea04f39a5a29243f8792d96464d4d064df5b975c
7
+ data.tar.gz: 4beb10e77c0df972b27366af49ad5ca3fee7c922bb801cc93b57d25c65cda51484c68f93a952c75cc8dc5639cdb58e47e5897ce0def27a52191db33149411129
@@ -2,24 +2,21 @@ module Fastlane
2
2
  module Actions
3
3
  class PrCommentAction < Action
4
4
  def self.run(params)
5
- if params[:pr_num].to_s.empty?
6
- UI.important('Skipping the PR comment.')
5
+ if params[:pr_num].to_s.empty? || params[:github_repo].to_s.empty?
6
+ UI.important('Skipping the PR comment because PR number or GitHub repo is not set.')
7
7
  else
8
- additional_args = []
9
8
  if params[:edit_last_comment_with_text]
10
- UI.message('Checking last comment for required pattern.')
11
- last_comments_per_author = sh("gh pr view #{params[:pr_num]} --json comments --jq '.comments | group_by(.author.login) | map(last)'")
12
- required_edition = params[:edit_last_comment_with_text]
13
- last_comment_match = required_edition && JSON.parse(last_comments_per_author).any? { |comment| comment['body'].include?(required_edition) }
9
+ text = params[:edit_last_comment_with_text]
10
+ UI.message("Checking last comment for required pattern: '#{text}'")
11
+ comments = sh("gh api repos/#{params[:github_repo]}/issues/#{params[:pr_num]}/comments --jq " \
12
+ "'[.[] | select(.body | test(\"#{text}\"; \"i\")) | {id, user: .user.login, html_url}]'")
14
13
 
15
- if last_comment_match
16
- additional_args << '--edit-last'
17
- else
18
- UI.important('Last comment does not match the pattern.')
14
+ JSON.parse(comments).each do |comment|
15
+ sh("gh api --method DELETE repos/#{params[:github_repo]}/issues/comments/#{comment['id']}")
19
16
  end
20
17
  end
21
- sh("gh pr comment #{params[:pr_num]} -b '#{params[:text]}' #{additional_args.join(' ')}")
22
- UI.success('PR comment been added.')
18
+ sh("gh pr comment #{params[:pr_num]} -b '#{params[:text]}'")
19
+ UI.success('PR comment has been added.')
23
20
  end
24
21
  end
25
22
 
@@ -33,6 +30,12 @@ module Fastlane
33
30
 
34
31
  def self.available_options
35
32
  [
33
+ FastlaneCore::ConfigItem.new(
34
+ env_name: 'GITHUB_REPOSITORY',
35
+ key: :github_repo,
36
+ description: 'GitHub repo name',
37
+ optional: true
38
+ ),
36
39
  FastlaneCore::ConfigItem.new(
37
40
  env_name: 'GITHUB_PR_NUM',
38
41
  key: :pr_num,
@@ -49,7 +52,7 @@ module Fastlane
49
52
  ),
50
53
  FastlaneCore::ConfigItem.new(
51
54
  key: :edit_last_comment_with_text,
52
- description: 'If last comment contains this text it will be edited',
55
+ description: 'If last comment contains this text it will be edited or replaced',
53
56
  is_string: true,
54
57
  optional: true
55
58
  )
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.92'
3
+ VERSION = '0.3.94'
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.92
4
+ version: 0.3.94
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
@@ -10,20 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2025-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: fastlane-plugin-xcsize
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 1.1.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 1.1.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: xctest_list
29
15
  requirement: !ruby/object:Gem::Requirement