Skip to content

Commit

Permalink
update paramater name 'accessToken' to 'personalAPIToken'
Browse files Browse the repository at this point in the history
  • Loading branch information
Guven Karanfil committed Aug 22, 2024
1 parent f54bfd0 commit e279025
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lane :test do
appcircle_testing_distribution(
accessToken: ENV["AC_ACCESS_TOKEN"],
personalAPIToken: ENV["AC_ACCESS_TOKEN"],
profileName: ENV["AC_PROFILE_NAME"],
appPath: ENV["AC_APP_PATH"],
message: ENV["AC_MESSAGE"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Fastlane
module Actions
class AppcircleTestingDistributionAction < Action
def self.run(params)
accessToken = params[:accessToken]
personalAPIToken = params[:personalAPIToken]
profileName = params[:profileName]
appPath = params[:appPath]
message = params[:message]
Expand All @@ -24,8 +24,8 @@ def self.run(params)
raise "Invalid file extension: #{file_extension}. For Android, use .apk or .aab. For iOS, use .ipa."
end

if accessToken.nil?
raise UI.error("Access token is required to authenticate connections to Appcircle services. Please provide a valid access token")
if personalAPIToken.nil?
raise UI.error("Personal API Token is required to authenticate connections to Appcircle services. Please provide a valid access token")
elsif profileName.nil?
raise UI.error("Distribution profile name is required to distribute applications. Please provide a distribution profile name")
elsif appPath.nil?
Expand All @@ -35,15 +35,15 @@ def self.run(params)
end


authToken = self.ac_login(accessToken)
authToken = self.ac_login(personalAPIToken)

profileId = TDUploadService.get_profile_id(authToken, profileName, createProfileIfNotExists)
self.ac_upload(authToken, appPath, profileId, message)
end

def self.ac_login(accessToken)
def self.ac_login(personalAPIToken)
begin
user = TDAuthService.get_ac_token(pat: accessToken)
user = TDAuthService.get_ac_token(pat: personalAPIToken)
UI.success("Login is successful.")
return user.accessToken
rescue => e
Expand Down Expand Up @@ -114,9 +114,9 @@ def self.details

def self.available_options
[
FastlaneCore::ConfigItem.new(key: :accessToken,
env_name: "AC_ACCESS_TOKEN",
description: "Provide the Appcircle access token to authenticate connections to Appcircle services",
FastlaneCore::ConfigItem.new(key: :personalAPIToken,
env_name: "AC_PERSONAL_API_TOKEN",
description: "Provide Personal API Token to authenticate connections to Appcircle services",
optional: false,
type: String),

Expand Down

0 comments on commit e279025

Please sign in to comment.