We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57e7f4e commit 9ac6651Copy full SHA for 9ac6651
DesignToolbox/fastlane/Fastfile
@@ -534,9 +534,19 @@ platform :ios do
534
puts "ℹ️ Check if '#{tag}' exists yet"
535
536
uri = URI("https://api.github.com/repos/#{GITHUB_ORG_REPO}/tags")
537
- response = Net::HTTP.get(uri)
+ http = Net::HTTP.new(uri.host, uri.port)
538
+ http.use_ssl = true
539
+
540
+ request = Net::HTTP::Get.new(uri.path)
541
+ request['Accept'] = 'application/vnd.github+json'
542
+ request['Authorization'] = "Bearer #{GITHUB_ACCESS_TOKEN}"
543
+ request['X-GitHub-Api-Version'] = '2022-11-28'
544
545
+ response = http.request(request)
546
tags = JSON.parse(response)
547
548
+ # puts tags.inspect # Uncomment for debug
549
550
if tags.any? { |t| t['name'] == tag }
551
puts "ℹ️ The tag '#{tag}' still exists, won't create new tag"
552
return false
0 commit comments