fastlane-plugin-stream_actions 0.4.18 → 0.4.20

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: 88f3fccde6a70f7e9a9404511d247b2d9362d0f76357bc7f664b63a0abc8329a
4
- data.tar.gz: '0893253baa0422ce6c25844f256c1ac2fcaac3031d9cc5f48dba08ff56658c1b'
3
+ metadata.gz: 73f71f91d0a2144675bc921423e2553ea94a5a24e55d765daf131c5c2d4d1de0
4
+ data.tar.gz: 5d5d416106e6677aa35911e2920681d98a781551e1026ef3a4914ccb3fa21ff8
5
5
  SHA512:
6
- metadata.gz: ebade8a7f1ac5aac41fb5f3b0d0208dd3918c970889add9abb9d4d8541e4248431256c1ef0eaeecee7705d0f2b6317923e7c4338108b502487b921d5d32243b8
7
- data.tar.gz: 9ebc3f1b2cfeaf82b0b821e1de032e670be5bdba3b4e26bb5766c03c5003637e38c493d9296ca30408b8c9a1038746740d3c50546a9ea5985503a142304caaef
6
+ metadata.gz: 4c2bd840b19ac480f21b907ab970cc9635bcfb65d3fc642fed006f6fa25b7dfded37f8688841ac6c410be97304dfe13e3c9d5cfd485d5479f209b62b057c1cef
7
+ data.tar.gz: 475ab117be3640b57487110f424aed4a2cd6a10357697475181a04ab752778e5fec0d6e46b5735f85f9c4cb8461ce73f76e8f8a5901d92448f62ef11f273b2a0
@@ -6,9 +6,7 @@ module Fastlane
6
6
 
7
7
  release_branch =
8
8
  if other_action.is_ci
9
- # This API operation needs the "admin:org" scope.
10
- ios_team = `gh api orgs/GetStream/teams/#{params[:github_team_name]}/members -q '.[].login'`.split("\n")
11
- UI.user_error!("#{params[:author]} is not a member of the iOS Team") unless ios_team.include?(params[:author])
9
+ ensure_author_is_repo_admin(author: params[:author], github_repo: params[:github_repo])
12
10
 
13
11
  other_action.current_branch
14
12
  else
@@ -34,6 +32,20 @@ module Fastlane
34
32
  other_action.pr_comment(text: comment)
35
33
  end
36
34
 
35
+ # Admin access to the repo is what separates the iOS team from the rest of the org (which only has write).
36
+ # Unlike listing org team members, this endpoint works with the workflow's built-in GITHUB_TOKEN.
37
+ def self.ensure_author_is_repo_admin(author:, github_repo:)
38
+ UI.user_error!('Release author is not set') if author.to_s.empty?
39
+ UI.user_error!('GitHub repo is not set') if github_repo.to_s.empty?
40
+
41
+ permission = sh(
42
+ 'gh', 'api', "repos/#{github_repo}/collaborators/#{author}/permission", '--jq', '.permission',
43
+ print_command_output: false,
44
+ error_callback: ->(_) {}
45
+ ).to_s.strip
46
+ UI.user_error!("#{author} needs admin access to #{github_repo} to merge a release (has: #{permission})") unless permission == 'admin'
47
+ end
48
+
37
49
  #####################################################
38
50
  # @!group Documentation
39
51
  #####################################################
@@ -51,9 +63,10 @@ module Fastlane
51
63
  optional: true
52
64
  ),
53
65
  FastlaneCore::ConfigItem.new(
54
- key: :github_team_name,
55
- description: 'Github team name',
56
- default_value: 'ios-developers'
66
+ env_name: 'GITHUB_REPOSITORY',
67
+ key: :github_repo,
68
+ description: 'GitHub repo name (owner/name)',
69
+ optional: true
57
70
  )
58
71
  ]
59
72
  end
@@ -10,7 +10,8 @@ module Fastlane
10
10
  if params[:edit_last_comment_with_text]
11
11
  text = params[:edit_last_comment_with_text]
12
12
  UI.message("Checking last comment for required pattern: '#{text}'")
13
- comments = sh('gh', 'api', "repos/#{params[:github_repo]}/issues/#{params[:pr_num]}/comments", log: false)
13
+ comments = sh('gh', 'api', "repos/#{params[:github_repo]}/issues/#{params[:pr_num]}/comments",
14
+ print_command: false, print_command_output: false)
14
15
 
15
16
  JSON.parse(comments).select { |comment| comment['body'].downcase.include?(text.downcase) }.each do |comment|
16
17
  sh("gh api --method DELETE repos/#{params[:github_repo]}/issues/comments/#{comment['id']}")
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.4.18'
3
+ VERSION = '0.4.20'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
4
+ version: 0.4.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-29 00:00:00.000000000 Z
11
+ date: 2026-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xctest_list