File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -534,8 +534,18 @@ platform :ios do
534
534
puts "ℹ️ Check if '#{ tag } ' exists yet"
535
535
536
536
uri = URI ( "https://api.github.com/repos/#{ GITHUB_ORG_REPO } /tags" )
537
- response = Net ::HTTP . get ( uri )
538
- tags = JSON . parse ( response )
537
+ 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 . body )
547
+
548
+ # puts tags.inspect # Uncomment for debug
539
549
540
550
if tags . any? { |t | t [ 'name' ] == tag }
541
551
puts "ℹ️ The tag '#{ tag } ' still exists, won't create new tag"
You can’t perform that action at this time.
0 commit comments