fastlane-plugin-stream_actions 0.4.19 → 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73f71f91d0a2144675bc921423e2553ea94a5a24e55d765daf131c5c2d4d1de0
|
|
4
|
+
data.tar.gz: 5d5d416106e6677aa35911e2920681d98a781551e1026ef3a4914ccb3fa21ff8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
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.
|
|
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-
|
|
11
|
+
date: 2026-11-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xctest_list
|