From 5e37314eb71bbd308cfd0cae4bc42188c19c2849 Mon Sep 17 00:00:00 2001 From: Alexey Alter-Pesotskiy Date: Fri, 3 Oct 2025 12:15:57 +0100 Subject: [PATCH] [CI] Get the correct target branch on public interface validation --- fastlane/Fastfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b3673b1dff9..f45aa1c0b2f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -847,12 +847,15 @@ end lane :validate_public_interface do next unless is_check_required(sources: sources_matrix[:public_interface], force_check: @force_check) - # Run the analysis on the current branch + # Get branch names original_branch = current_branch + target_branch = ENV['GITHUB_BASE_REF'] || (original_branch.include?('release/') ? 'main' : 'develop') + UI.important("Target branch: #{target_branch} 🕊️") + + # Run the analysis on the current branch sh('interface-analyser analysis ../Sources/ public_interface_current.json') # Checkout the target branch - target_branch = original_branch.include?('release/') ? 'main' : 'develop' sh("git fetch origin #{target_branch}") sh("git checkout #{target_branch}")