fastlane-plugin-stream_actions 0.4.22 → 0.4.24

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: 4784999ab4dfa4274ec20304e8ff6f1e1228cc583a91e6ab4127a102cc34027f
4
- data.tar.gz: 1853aa6c5258f011f768edbf4683dcca02b5081805c8d6e5e9169595e0e58272
3
+ metadata.gz: bbc79a06fcf9cce94c4465b30ca64213c0f159d0bdcef27072c31c335a1d80f8
4
+ data.tar.gz: 8cbebf3337a4768d952fa040043362e6ed4e5a33304bfa5929f43f27d173ffc9
5
5
  SHA512:
6
- metadata.gz: 9236659fd7094336030f5994005e57a71e7b4a1d693aa3cc9a918fefd8b01bcf17b09d1b3fb3c0ca8ed3c0527622c52ceb4a7181b2cce7f4e5fb62aaa5e951f5
7
- data.tar.gz: 7527de60fc668057e9ed3b1231174ad7999e6390346c7d6f63966cb41efc27bff7e35d633788080da9c04dca043c3bd0b93f2b57936767588dca997477c02bd3
6
+ metadata.gz: e080115972ff3b2786ba18f6016fe525fe38ee8acb92214d92a17e04636f818c007e8d72b4720434a81cfd324143e46860f07fdd09487cf0642ee97d39d0d3ed
7
+ data.tar.gz: 8e3664452bc16e3774ee9fd774df675e07545b9c334b3d1bf23234cde342c69087ab1be781c9ef7731cd73ec65a6c9d34408f2d4f3a40d2ea8800fd0c6abbf9a
@@ -1,3 +1,5 @@
1
+ require 'base64'
2
+
1
3
  module Fastlane
2
4
  module Actions
3
5
  class CustomMatchAction < Action
@@ -9,17 +11,30 @@ module Fastlane
9
11
  params[:readonly] = false
10
12
  end
11
13
 
14
+ auth = git_authorization(params[:git_token])
12
15
  %w[development adhoc appstore].each do |type|
13
- other_action.match(
16
+ options = {
14
17
  api_key: params[:api_key],
15
18
  type: type,
16
19
  app_identifier: params[:app_identifier],
17
20
  readonly: params[:readonly],
18
21
  force_for_new_devices: !other_action.is_ci
19
- )
22
+ }
23
+ options[:git_basic_authorization] = auth if auth
24
+ other_action.match(**options)
20
25
  end
21
26
  end
22
27
 
28
+ # Basic auth header value for cloning the certificates repo over HTTPS.
29
+ def self.git_authorization(token)
30
+ return nil if token.to_s.empty?
31
+
32
+ auth = Base64.strict_encode64("x-access-token:#{token}")
33
+ # match can print its git command, so hide the header in CI logs.
34
+ $stdout.puts("::add-mask::#{auth}") if ENV['GITHUB_ACTIONS'] == 'true'
35
+ auth
36
+ end
37
+
23
38
  #####################################################
24
39
  # @!group Documentation
25
40
  #####################################################
@@ -52,6 +67,13 @@ module Fastlane
52
67
  default_value: true,
53
68
  description: 'If `readonly: true` (by default), installs all Certs and Profiles necessary for development and ad-hoc.\nIf `readonly: false`, recreates all Profiles necessary for development and ad-hoc, updates them locally and remotely'
54
69
  ),
70
+ FastlaneCore::ConfigItem.new(
71
+ env_name: 'MATCH_GIT_TOKEN',
72
+ key: :git_token,
73
+ description: 'GitHub token that can read the certificates repo over HTTPS. Without it, match uses your git credentials',
74
+ sensitive: true,
75
+ optional: true
76
+ ),
55
77
  FastlaneCore::ConfigItem.new(
56
78
  key: :register_device,
57
79
  is_string: false,
@@ -17,14 +17,19 @@ module Fastlane
17
17
  body = 'This PR was created automatically by CI.'
18
18
  body += "\n\nTriggered by: #{run_url}" if run_url
19
19
 
20
- other_action.create_pull_request(
21
- api_token: ENV.fetch('GITHUB_TOKEN'),
20
+ # `api_bearer`, because GitHub App tokens do not authenticate with the Basic scheme of `api_token`.
21
+ pull_request = other_action.create_pull_request(
22
+ api_bearer: ENV.fetch('GITHUB_TOKEN'),
22
23
  repo: params[:github_repo],
23
24
  title: params[:title],
24
25
  head: params[:head_branch],
25
26
  base: params[:base_branch],
26
27
  body: body
27
28
  )
29
+ # `create_pull_request` only logs a failed request and returns nil.
30
+ unless pull_request
31
+ UI.user_error!("Failed to create the pull request. The branch #{params[:head_branch]} is already pushed.")
32
+ end
28
33
  end
29
34
  end
30
35
 
@@ -20,7 +20,8 @@ module Fastlane
20
20
  make_latest = params[:make_latest]
21
21
  release = other_action.set_github_release(
22
22
  repository_name: params[:github_repo],
23
- api_token: params[:github_token],
23
+ # `api_bearer`, because GitHub App tokens do not authenticate with the Basic scheme of `api_token`.
24
+ api_bearer: params[:github_token],
24
25
  name: version_number,
25
26
  tag_name: version_number,
26
27
  description: changes,
@@ -52,7 +53,7 @@ module Fastlane
52
53
  UI.user_error!('Failed to create the GitHub release') unless release.kind_of?(Hash) && release['id']
53
54
 
54
55
  other_action.github_api(
55
- api_token: params[:github_token],
56
+ api_bearer: params[:github_token],
56
57
  http_method: 'PATCH',
57
58
  path: "repos/#{params[:github_repo]}/releases/#{release['id']}",
58
59
  body: { draft: false, make_latest: 'false' }
@@ -45,14 +45,22 @@ module Fastlane
45
45
  commit_changes(version_number)
46
46
 
47
47
  if params[:create_pull_request]
48
- other_action.create_pull_request(
49
- api_token: params[:github_token],
48
+ # `api_bearer`, because GitHub App tokens do not authenticate with the Basic scheme of `api_token`.
49
+ pull_request = other_action.create_pull_request(
50
+ api_bearer: params[:github_token],
50
51
  repo: params[:github_repo],
51
52
  title: "#{version_number} Release",
52
53
  head: "release/#{version_number}",
53
54
  base: 'main',
54
55
  body: changes.to_s
55
56
  )
57
+ # `create_pull_request` only logs a failed request and returns nil.
58
+ unless pull_request
59
+ UI.user_error!(
60
+ "Failed to create the release pull request. The branch release/#{version_number} is already pushed: " \
61
+ 'open the pull request by hand, or delete the branch before you start the release again.'
62
+ )
63
+ end
56
64
  end
57
65
 
58
66
  UI.success("Successfully started release #{version_number}! 🚢")
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.4.22'
3
+ VERSION = '0.4.24'
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.22
4
+ version: 0.4.24
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-16 00:00:00.000000000 Z
11
+ date: 2026-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xctest_list